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

Conflic with PyTorch with CUDA in a conda environment? #1276

Open
leyangjin opened this issue Oct 26, 2021 · 2 comments
Open

Conflic with PyTorch with CUDA in a conda environment? #1276

leyangjin opened this issue Oct 26, 2021 · 2 comments

Comments

@leyangjin
Copy link

Steps to reproduce

  1. install PyTorch with CUDA in a conda environment from the official PyTorch website using the command provided in the website:
    pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
  2. install nevergrad via conda: conda install nevergrad

Observed Results

PyTorch with CUDA can't execute correctly when I execute other PyTorch codes. The following error occurs:

AssertionError: Torch not compiled with CUDA enabled

When I execute this code: print(torch.cuda.is_available()), it returns False

Expected Results

I think PyTorch with CUDA shouldn't be affected by nevergrad package.
It seems that nevergrad installation via conda contains PyTorch 1.3.0 installation. Maybe PyTorch with CUDA installed before conflicts with the PyTorch in nevergrad.

Relevant Code

environment: win10 + PyTorch1.10.0+CUDA11.3
I just install the packages with the conda and pip command above.
@jrapin
Copy link
Contributor

jrapin commented Dec 7, 2021

Hi,
They probably do :s
I'm not sure what is included in the conda package actually (I'm not the one who created it), I expected it would only contain the minimal requirements which do not include pytorch :s The additional requirements are only provided for benchmarks, and are conflict prone because there are a lot of different constraints and no good way to deal with them (each benchmark comes with its own requirements...)

@beckhamwjc
Copy link

I'm using PyTorch + nevergrad on Ubuntu 20.04 and the cuda computation works fine. First I created an environment with conda and installed PyTorch with "conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch" taken from PyTorch.org. Then in the same environment, I installed nevergrad with "pip install nevergrad". Until now, everything is fine including cuda computing of torch tensors. I wonder if this could provide some hints for you.

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

3 participants