problem installing torch on conda environment

Viewed 38

Hi I'm trying to install torch on conda environment on pycharm, but I get this error:

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.


PackagesNotFoundError: The following packages are not available from current channels:

  - torch

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/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.

Can anyone please help? Thanks!

1 Answers

While the Python module is named torch, the Conda package is named pytorch. Typically, users follow the official recommendations and create a dedicated environment. For example,

conda create -n pytorch -c pytorch -c conda-forge python=3.9 pytorch torchvision torchaudio

Include all packages you plan to use at creation time (example, include cudatoolkit or cpuonly).

Related