question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

torchvision conda packaging fails to resolve when opencv constraint is present

See original GitHub issue

🐛 Describe the bug

This seems to be somewhat serious to figure out and resolve by the next release or asap.

Here’s how the bug manifests. There’s a very common scenario when someone installs torchvision and opencv within the same conda environment.

However, running the following command:

conda create -n tvtest python=3.7 "torchvision>=0.10" "cudatoolkit>=11" opencv -c pytorch -c conda-forge

This results in the torchvision resolving as the cpu torchvision packge from conda-forge, the pytorch being resolved from pytorch channel, and the worst part, old versions of pytorch and pytorch-cpu being installed.

Tested with latest anaconda: conda --version resolves to conda 4.10.3.

Removing opencv in the above command results in torchvision and pytorch correctly resolving to their CUDA binaries, and pytorch-cpu not being installed.

cc: @malfet

Versions

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31

Python version: 3.9.5 (default, Jun  4 2021, 12:28:51)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: 11.1.105
GPU models and configuration:
GPU 0: GeForce GTX TITAN X
GPU 1: GeForce GTX TITAN X

Nvidia driver version: 460.73.01
cuDNN version: Probably one of the following:
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.0.5
/usr/local/cuda-11.1/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] Could not collect
[conda] # packages in environment at /home/soumith/miniconda3:

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
soumithcommented, Oct 20, 2021

we just added CI testing for these in https://github.com/pytorch/pytorch-integration-testing/pull/21 yesterday

1reaction
soumithcommented, Oct 19, 2021

@datumbox just fyi, I confirmed that this is not a dependency issue, but a packaging issue – i.e. our packaging seems to be at fault.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package pytorch conflicts when installing with conda #59222
I'm trying to install PyTorch through conda but I'm getting "conflict" errors: I first activated the conda virtualenvironment: (base) ...
Read more >
pytorch - Installing cudatoolkit works with conda install but not ...
You have that error because there is no package called pytorch::cudatoolkit found by conda. You yml env file have to look like this:...
Read more >
conda solving environment failed with initial frozen solve
How we can resolve "Solving environment: failed with initial frozen solve. Retrying with flexible solve." issue while installing the new conda package.
Read more >
anaconda安装opencv -> python[version='>=2.7,<2.8.0a0 ...
not available for the python version you are constrained to. ... Above error suggested that opencv package in the current repository is only ......
Read more >
Available CRAN Packages By Date of Publication
2022-12-17, pkgdepends, Package Dependency Resolution and Downloads ... A Comprehensive Set of Functions to Clean, Analyze, and Present Crime Data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found