I get the installation command from the https://pytorch.org/get-started/locally/. When I run the command:
conda install pytorch torchvision torchaudio cudatoolkit=11.1.0 -c pytorch
I get the following error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- cudatoolkit=11.1.0
Current channels: like
- https://conda.anaconda.org/pytorch/linux-64
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Then I have tried the following commands one by one:
(base) eslam@scholar:~$ conda config --append channels conda-forge
(base) eslam@scholar:~$ install cudatoolkit=11.1.0
install: missing destination file operand after 'cudatoolkit=11.1.0'
Try 'install --help' for more information.
(base) eslam@scholar:~$ conda install -c conda-forge cudatoolkit=11.1.0
Get the same output as above.
(base) eslam@scholar:~$ conda info --envs
# conda environments:
#
base * /home/eslam/anaconda3
How can I fix this problem, please?
you need to use -c conda-forge
for newest installs. From official site the command is:
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
https://pytorch.org
This worked for me: conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia -c conda-forge
You can search cudatoolkit
in anaconda.org and find the channel that has your arch and version. In my case, I was installing PyTorch 1.8.1 under Windows but apparently the nvidia
channel mentioned on the front page of PyTorch doesn't contain any packages for Windows, so I had to switch to conda-forge
, where cudatoolkit 11.1 can be found (e.g., from the search result above).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With