Numpy version too old - conflicts with TensorFlow
Closed this issue · 2 comments
raffaem commented
$ pip install -r requirements.txt
Collecting tensorflow
Downloading tensorflow-2.8.0-cp310-cp310-manylinux2010_x86_64.whl (497.6 MB)
|████████████████████████████████| 497.6 MB 16 kB/s
Collecting numpy==1.18.5
Downloading numpy-1.18.5.zip (5.4 MB)
|████████████████████████████████| 5.4 MB 377 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting scipy
Using cached scipy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.3 MB)
Collecting pillow
Using cached Pillow-9.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
Collecting pyyaml
Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
|████████████████████████████████| 682 kB 3.8 MB/s
Collecting pyfakewebcam
Downloading pyfakewebcam-0.1.0.tar.gz (12 kB)
Collecting opencv-python
Downloading opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.4 MB)
|████████████████████████████████| 60.4 MB 6.3 MB/s
Collecting tfjs-graph-converter==1.4.2
Downloading tfjs_graph_converter-1.4.2-py3-none-any.whl (32 kB)
Collecting tensorflowjs>=1.5.2
Downloading tensorflowjs-3.13.0-py3-none-any.whl (77 kB)
|████████████████████████████████| 77 kB 2.8 MB/s
Collecting tf-estimator-nightly==2.8.0.dev2021122109
Downloading tf_estimator_nightly-2.8.0.dev2021122109-py2.py3-none-any.whl (462 kB)
|████████████████████████████████| 462 kB 5.0 MB/s
Collecting protobuf>=3.9.2
Downloading protobuf-3.19.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 1.0 MB/s
Collecting tensorboard<2.9,>=2.8
Downloading tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
|████████████████████████████████| 5.8 MB 7.0 MB/s
Collecting flatbuffers>=1.12
Downloading flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
Collecting wrapt>=1.11.0
Using cached wrapt-1.13.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (81 kB)
Collecting absl-py>=0.4.0
Downloading absl_py-1.0.0-py3-none-any.whl (126 kB)
|████████████████████████████████| 126 kB 4.4 MB/s
Collecting termcolor>=1.1.0
Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting grpcio<2.0,>=1.24.3
Downloading grpcio-1.43.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB)
|████████████████████████████████| 4.1 MB 4.5 MB/s
Collecting h5py>=2.9.0
Downloading h5py-3.6.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
|████████████████████████████████| 4.5 MB 3.0 MB/s
Collecting keras<2.9,>=2.8.0rc0
Downloading keras-2.8.0-py2.py3-none-any.whl (1.4 MB)
|████████████████████████████████| 1.4 MB 8.2 MB/s
Collecting google-pasta>=0.1.1
Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
|████████████████████████████████| 57 kB 4.7 MB/s
Collecting libclang>=9.0.1
Downloading libclang-13.0.0-py2.py3-none-manylinux1_x86_64.whl (14.5 MB)
|████████████████████████████████| 14.5 MB 10.1 MB/s
Requirement already satisfied: setuptools in /home/raffaele/pyvenv/virtualwebcam/lib/python3.10/site-packages (from tensorflow->-r requirements.txt (line 1)) (57.4.0)
Collecting opt-einsum>=2.3.2
Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
|████████████████████████████████| 65 kB 3.1 MB/s
Collecting six>=1.12.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting keras-preprocessing>=1.1.1
Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
|████████████████████████████████| 42 kB 1.5 MB/s
INFO: pip is looking at multiple versions of tfjs-graph-converter to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 1) and numpy==1.18.5 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested numpy==1.18.5
tensorflow 2.8.0 depends on numpy>=1.20
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: You are using pip version 21.2.3; however, version 22.0.3 is available.
You should consider upgrading via the '/home/raffaele/pyvenv/virtualwebcam/bin/python3 -m pip install --upgrade pip' command.
allo- commented
Can you try to just use latest numpy? There should no reason to use a specific version of numpy for this project.
raffaem commented
yes, using the latest numpy it works.
There is only this warning:
XXX/virtual_webcam_background/virtual_webcam.py:187: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
frame = frame.astype(np.float)