Cannot install any version of torchvision newer than 0.2.2 with opencv for python 3.9 and pytorch 1.9.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🐛 Bug
Issue #3207 has cropped up again for pytorch 1.9.0
Cannot install any version of torchvision newer than 0.2.2 with opencv for python 3.9
To Reproduce
Contents of ~/.condarc:
channels:
- defaults
- anaconda
- pytorch
- conda-forge
channel_priority: disabled
On the command line:
conda create -n temp python=3.9
conda activate temp
conda install torchvision opencv pytorch=1.9.0
This installs torchvision version 0.2.2.
Replacing the last line with
conda install torchvision=0.10.0 opencv pytorch=1.9.0
produces the error
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package bzip2 conflicts for:
opencv -> pypy3.6[version='>=7.3.3'] -> bzip2[version='1.0.*|>=1.0.6,<2.0a0|>=1.0.8,<2.0a0|>=1.0.6,<1.1.0a0']
torchvision==0.10.0=py39_cu111 -> ffmpeg[version='>=4.2'] -> bzip2[version='>=1.0.8,<2.0a0']
Package jpeg conflicts for:
torchvision==0.10.0=py39_cu111 -> jpeg[version='<=9b']
torchvision==0.10.0=py39_cu111 -> pillow[version='>=5.3.0'] -> jpeg[version='>=9b,<10a|>=9d,<10a|>=9c,<10a']
Package libpng conflicts for:
torchvision==0.10.0=py39_cu111 -> libpng
torchvision==0.10.0=py39_cu111 -> ffmpeg[version='>=4.2'] -> libpng[version='>=1.6.37,<1.7.0a0']
Package python_abi conflicts for:
torchvision==0.10.0=py39_cu111 -> python_abi=3.9[build=*_cp39]
torchvision==0.10.0=py39_cu111 -> pillow[version='>=5.3.0'] -> python_abi[version='3.6|3.6.*|3.7|3.7.*|3.8.*',build='*_cp38|*_pypy36_pp73|*_pypy37_pp73|*_cp36m|*_cp37m']
Package python conflicts for:
torchvision==0.10.0=py39_cu111 -> python[version='>=3.9,<3.10.0a0']
opencv -> py-opencv==4.5.2=py39hef51801_0 -> python[version='3.7.*|3.9.*|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|3.8.*']
opencv -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0|3.4.*']
torchvision==0.10.0=py39_cu111 -> pillow[version='>=5.3.0'] -> python[version='3.9.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']
python=3.9
Package _libgcc_mutex conflicts for:
opencv -> libgcc-ng[version='>=7.3.0'] -> _libgcc_mutex[version='*|0.1|0.1',build='main|conda_forge']
python=3.9 -> libgcc-ng[version='>=7.5.0'] -> _libgcc_mutex[version='*|0.1|0.1',build='main|conda_forge']
Package tzdata conflicts for:
torchvision==0.10.0=py39_cu111 -> python[version='>=3.9,<3.10.0a0'] -> tzdata
python=3.9 -> tzdataThe following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.33=0
- torchvision==0.10.0=py39_cu111 -> cudatoolkit[version='>=11.1,<11.2'] -> __glibc[version='>=2.17,<3.0.a0']
Your installed version is: 2.33
Expected behavior
Torchvision version 0.10.0 should be selected for installation.
If version is explicitly specified, packages should get installed without error.
Environment
OS: Ubuntu 20.10 (x86_64)
GCC version: (Ubuntu 10.2.0-13ubuntu1) 10.2.0
Clang version: 11.0.0-2
CMake version: version 3.16.3
Python version: 3.9 (64-bit runtime)
GPU models and configuration: GPU 0: GeForce 930MX
Nvidia driver version: 460.80
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by recreating the documented Ubuntu environment and running the two conda installation commands from the issue. Compare the dependency constraints for Python 3.9, PyTorch 1.9.0, torchvision 0.10.0, and OpenCV, including the related issue #3207. Done means the explicitly requested versions install together without an UnsatisfiableError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- anaconda, opencv, python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100