Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outdated requirements? #131

Closed
xenogenesi opened this issue Nov 9, 2020 · 11 comments
Closed

outdated requirements? #131

xenogenesi opened this issue Nov 9, 2020 · 11 comments

Comments

@xenogenesi
Copy link

I am trying to run it locally but I have problems with dependency versions, I have tried with Debian/sid and then with docker (which is based on nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 and is the same image for the face-alignment project which works)

ERROR: Could not find a version that satisfies the requirement opencv-python==4.1.0.25 (from -r requirements.txt (line 4)) (from versions: 3.4.8.29, 3.4.9.31, 3.4.9.33, 3.4.10.35, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 4.1.2.30, 4.2.0.32, 4.2.0.34, 4.3.0.36, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46)
ERROR: No matching distribution found for opencv-python==4.1.0.25 (from -r requirements.txt (line 4))

ERROR: Could not find a version that satisfies the requirement tensorflow==1.12.0 (from -r requirements.txt (line 5)) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.4.0rc0)
ERROR: No matching distribution found for tensorflow==1.12.0 (from -r requirements.txt (line 5))

ERROR: Could not find a version that satisfies the requirement torch==1.1.0 (from -r requirements.txt (line 6)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0)
ERROR: No matching distribution found for torch==1.1.0 (from -r requirements.txt (line 6))

ERROR: Could not find a version that satisfies the requirement torchvision==0.3.0 (from -r requirements.txt (line 7)) (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.8.0, 0.8.1)
ERROR: No matching distribution found for torchvision==0.3.0 (from -r requirements.txt (line 7))

I tried to upgrade the packages with the nearest available stable version

--- a/requirements.txt
+++ b/requirements.txt
@@ -1,9 +1,9 @@
 librosa==0.7.0
 numpy==1.17.1
 opencv-contrib-python==4.2.0.34
-opencv-python==4.1.0.25
-tensorflow==1.12.0
-torch==1.1.0
-torchvision==0.3.0
+opencv-python==4.1.2.30
+tensorflow==2.2.0
+torch==1.4.0
+torchvision==0.6.0
 tqdm==4.45.0
 numba==0.48

But then numpy fail to build

    ...
    [cut]
    ...
    numpy/random/entropy.c:23684:15: error: ‘__Pyx_PyCode_New’ undeclared (first use in this function); did you mean ‘PyCode_New’?
         py_code = __Pyx_PyCode_New(
                   ^~~~~~~~~~~~~~~~
                   PyCode_New
    error: Command "gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNPY_NO_DEPRECATED_API=0 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.8/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/conda/include/python3.8 -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.8/numpy/core/src/common -Ibuild/src.linux-x86_64-3.8/numpy/core/src/npymath -c numpy/random/entropy.c -o build/temp.linux-x86_64-3.8/numpy/random/entropy.o -MMD -MF build/temp.linux-x86_64-3.8/numpy/random/entropy.o.d -U__GNUC_GNU_INLINE__ -std=c99 -msse2" failed with exit status 1
    ----------------------------------------
  Rolling back uninstall of numpy
  Moving to /opt/conda/bin/f2py
   from /tmp/pip-uninstall-tyzmyngj/f2py
  Moving to /opt/conda/bin/f2py3
   from /tmp/pip-uninstall-tyzmyngj/f2py3
  Moving to /opt/conda/bin/f2py3.8
   from /tmp/pip-uninstall-tyzmyngj/f2py3.8
  Moving to /opt/conda/lib/python3.8/site-packages/numpy-1.19.2.dist-info/
   from /opt/conda/lib/python3.8/site-packages/~umpy-1.19.2.dist-info
  Moving to /opt/conda/lib/python3.8/site-packages/numpy/
   from /opt/conda/lib/python3.8/site-packages/~umpy
ERROR: Command errored out with exit status 1: /opt/conda/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mkks_ft8/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mkks_ft8/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-c67btjrp/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.8/numpy Check the logs for full command output.

Any hint to get it working?

@prajwalkr
Copy link
Collaborator

Hello, I cannot help you regarding the NumPy build, but can you try with the right Python version (3.6 or 3.7) and let me know if you fail to install the requirements for that as well?

@xenogenesi
Copy link
Author

Thanks, I saw that the numpy compilation seems to be a python 3.8 specific problem, as soon as I have time I will try to install the 3.6 in the docker image (there is a good chance that the 3.7 will work or should I stay on 3.6 to be sure?)

@prajwalkr
Copy link
Collaborator

Most people have tried with 3.6. I think you have a better chance with 3.6.

@xenogenesi
Copy link
Author

Ok, it seems to work with the dependencies specified in requirements, if you are interested here is a gist of the Dockerfile (to clean and fix for cuda which does not work for me for the version in the card too old) and .dockerignore.

Thanks.

@prajwalkr
Copy link
Collaborator

If you can add it with instructions on how to use and create a pull request, I can merge it into the main repo. I have no experience with docker, so I would not be able to contribute here.

Glad your issue is solved! :)

@xenogenesi
Copy link
Author

Thanks, sorry if I answer here even if the issue is closed, I cleaned up the gist a bit and added some instructions in the header, it is easy to use once a compatible version of docker is installed, the commands must be given in the project directory , the first build of the docker image takes some time (and some disk space) to download / install / build but only needs to be done once, docker run ... is used to instantiate the image and access it via the shell. I just tried inference.py and it works! Other modules, such as for training, may not find one or more of the dependencies and fail, the Dockerfile should be updated in that case, installing the modules and rebuilding the image.

I think right now it is still incomplete to open a PR, but it could be a good starting point if someone with docker experience and a gpu suitable for training wants to try.

prajwalkr added a commit that referenced this issue Nov 11, 2020
@PraffulVarshney
Copy link

@prajwalkr @snehitvaddi @dipam7 @xenogenesi
Hello, I am Prafful Varshney, a Sophomore at IIT Roorkee working on a course ML project Lip-Sync. I have some doubts regarding this model. Can we have a small meeting on google meet or any other platform? Please give us time when you are free.
Looking forward to receiving an optimistic response.
Any help would be highly appreciated.
Thank You
Regards

@SohamGovande
Copy link

I hope this message finds you well. I encountered a similar issue as the original poster when using Python 3.10, so I switched to Python 3.6 as recommended. However, I have run into another problem when attempting to install the dependencies using pip install -r requirements.txt.

The installation process seems to get stuck at the following step for an extended period (over an hour):

Building wheel for opencv-contrib-python (PEP 517) ...

I have tried searching for any existing solutions within the repository's issues and related discussions, but I haven't found any relevant information so far. I was wondering if anyone else has experienced this issue and if there's a known solution or workaround for it.

Thanks!

tangledpuzzle added a commit to tangledpuzzle/Wav2Lip that referenced this issue Jul 24, 2023
@kkkiqjn
Copy link

kkkiqjn commented Sep 5, 2023

global cap.cpp:597 cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): temp/result.avi in function 'cv::icvExtractPattern'

100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [04:28<00:00, 268.58s/it]
Traceback (most recent call last):
File "C:\Users\saket\Wav2Lip-GFPGAN\Wav2Lip-master\inference.py", line 280, in
main()
File "C:\Users\saket\Wav2Lip-GFPGAN\Wav2Lip-master\inference.py", line 277, in main
subprocess.call(command, shell=platform.system() != 'Windows')
File "C:\Users\saket\anaconda3\lib\subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\saket\anaconda3\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\saket\anaconda3\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

I am getting this , can any one solve this

@dizhenx
Copy link

dizhenx commented Oct 10, 2023

ne solve this

Have you solve it?

GraiemBell added a commit to GraiemBell/Wav2Lip that referenced this issue Dec 16, 2023
@bryanlimktscv
Copy link

bryanlimktscv commented Jun 8, 2024

Hope this might help someone:

I had installed Python 3.6.8 on my Windows machine and was running pip install --timeout=360 -r requirements.txt.

Firstly, make sure to use the 64-bit Python version as PyTorch does NOT work on the 32-bit Python version (Reference: PyTorch Windows Installation).

I was facing this issue:

ERROR: Could not find a version that satisfies the requirement torch==1.1.0 (from versions: none)
ERROR: No matching distribution found for torch==1.1.0

This was resolved by going to: PyTorch CPU Wheel Files
(Note: For CUDA 10.0, use PyTorch CUDA 10.0 Wheel Files.
For CUDA 9.0, use PyTorch CUDA 9.0 Wheel Files).

Then use Ctrl+F to search for:

torch-1.1.0-cp{CPython version}-cp{CPython version}m-win_amd64.whl

Replace {CPython version} with your Python version, for example 36 for Python 3.6.

Then download that file. Install using:

pip install <path to wheel file>

(Reference: Stack Overflow)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants