Comments (17)
Create a virtual environment with the python version specified. Then install the requirements.
from watermark-remover.
from watermark-remover.
I'm getting this error as well
from watermark-remover.
I have the same issue too, I have the right python version and the requirements install fine.
from watermark-remover.
I had the same issue initially. I solved it by creating a virtual environment with conda and running it in that.
The command: conda create -n myenv python=3.6.5
You can reference it here: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#deactivating-an-environment
from watermark-remover.
Thanks for answers.
I fixed this problem by decompile .pyc files to .py using util uncompyle6 and just work with them.
And yes, author, why do you compile files to .pyc? What's the catch?
from watermark-remover.
@KR1470R Can you details about your solution?
I tried to install uncompyle6 but it does not work.
from watermark-remover.
I pull the docker image and I can run the command inside docker
"python3 main.pyc --mode train --dataset demo --iters 3 --watermark_threshold 0.6 --save_result true"
But I always got killed
from watermark-remover.
@vantinhuynh What's a problem with uncompyle6?
Example usage:
uncompyle6 utils.cpython-38.pyc > utils.py
from watermark-remover.
@vantinhuynh I can install the docker image, but then do not know how/where to actually run the code, can you give the steps you used?
@CodeSaint98 When you say create the environment, exactly what do you mean, what commands did you use exactly?
conda create -n myenv python=3.6.5
zsh: command not found: conda
Thanks a lot, just trying to get this to work, and am a bit lost, would appreciate any help.
from watermark-remover.
@arthurwolf Make sure that you've installed Anaconda properly on your system first. You can refer this link: https://docs.anaconda.com/anaconda/install/.
If you did install Anaconda and you're still facing this error refer this link: https://stackoverflow.com/questions/31615322/zsh-conda-pip-installs-command-not-found.
You don't have to use Anaconda to create the virtual environment. You can use anything as long as it creates an environment with the specified python version. This bad number error occurs because the compiler the original author used to compile his code to .pyc is different from the one you're using. Decompiling it and then compiling it with your compiler also works but its a bit too long a method when you can just implement a virtual environment.
from watermark-remover.
@KR1470R KR
It is ok with me know
@arthurwolf ar
You must rewrite Dockerfile
FROM whitelok/watermark-remover:v1.0
RUN apt-get update
RUN apt-get install apache2 -y
RUN rm -rf /root/watermark-remover/*
RUN git clone https://github.com/whitelok/watermark-remover.git
RUN chmod 755 /root/watermark-remover/watermark-remover/train.sh
WORKDIR /root/watermark-remover/watermark-remover
EXPOSE 80
CMD apachectl -D FOREGROUND
And then run docker build
Next Start the container with the new images has just been built above
Next Access inside docker container and run above command
from watermark-remover.
@vantinhuynh I have zero idea what «Access inside docker container and run above command« means...
from watermark-remover.
I managed to get it to work with conda, thanks for the help. Still would like to know how to use it through docker as that'd be easier to deploy ultimately.
from watermark-remover.
- docker run -d --name watermark your_docker_image_after_build
- docker exec -it watermark /bin/bash
from watermark-remover.
@vantinhuynh Thank you.
However, i did decompiled .pyc files because change some behavior of this program for my case.
from watermark-remover.
Thanks for someone's suggestion. ALL CODE IN THIS WILL BE DELETE FOREVER. So no support anymore.
Closing
from watermark-remover.
Related Issues (20)
- manifest unknown when running docker pull HOT 1
- Problem with the imports in "./autowatermarkremoval/solver.py" HOT 1
- "Can't use on your computer, sorry" HOT 1
- Get caught in loop with train.sh HOT 2
- only for watermark with a same size? HOT 2
- 像美图秀秀中,消除笔 HOT 1
- please fix solver.py, cannot load watermark image from folder results HOT 1
- bad magic number error HOT 4
- OpenCV docker compilation error HOT 2
- Error ravel_multi_index HOT 1
- error when saving image HOT 1
- Watermark detect algo is not stable HOT 12
- exchange the source code? HOT 1
- RuntimeError: Bad magic number in .pyc file (Docker) HOT 5
- problem with remove.sh HOT 9
- Cannot build the docker image from master HOT 2
- RuntimeError: Bad magic number in .pyc file HOT 2
- Can not load watermark image HOT 2
- Files in order HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watermark-remover.