How to use pytorch 1.7.0+cu110 from Pycharm

I have a previous code written using python 3.7 and torch 1.7.0+cu110 . Now, I can not execute it with another computer having GPU. I can not install it from the repository and I am getting these kind of errors.

ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cu110 (from versions: 2.0.0, 2.0.0+cpu, 2.0.0+cu117, 2.0.0+cu118, 2.0.1, 2.0.1+cpu, 2.0.1+cu117, 2.0.1+cu118, 2.1.0, 2.1.0+cpu, 2.1.0+cu118, 2.1.0+cu121
, 2.1.1, 2.1.1+cpu, 2.1.1+cu118, 2.1.1+cu121, 2.1.2, 2.1.2+cpu, 2.1.2+cu118, 2.1.2+cu121, 2.2.0, 2.2.0+cpu, 2.2.0+cu118, 2.2.0+cu121, 2.2.1, 2.2.1+cpu, 2.2.1+cu118, 2.2.1+cu121)
ERROR: No matching distribution found for torch==1.7.0+cu110

Then, I downloaded a whl file in order to install from the local directory. However, I am still getting the following error:

ERROR: torch-1.7.0+cu110-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

Is there anyone recommending doing something else?

I think you can install torch1.7.0+cu110 by conda instead of pip

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch

See Previous PyTorch Versions | PyTorch

I tried to do it. Actually, I think there is another problem. In Pycharm terminal window, when I check the Python version it is 3.7 but conda package thinks that Python version is 3.11 and it says there are some inconsistencies. I saw the following outputs after executing the previous conda install command.

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  • pytorch==1.7.0 → python[version=‘>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0’]
  • torchaudio==0.7.0 → python[version=‘>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0’]
  • torchvision==0.8.0 → python[version=‘>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0’]

Your python: python=3.11

If python is on the left-most side of the chain, that’s the version you’ve asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with each other:

Output in format: Requested package → Available versions

Package numpy-base conflicts for:
pytorch==1.7.0 → numpy[version=‘>=1.11’] → numpy-base[version=‘1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.
11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.14.3|1.14.3|


Package vc conflicts for:
torchaudio==0.7.0 → python[version=’>=3.7,<3.8.0a0’] → vc=14
python=3.11 → vc[version=‘>=14.1,<15.0a0’]
torchvision==0.8.0 → cudatoolkit[version=‘>=11.0,<11.1’] → vc[version=‘14.|>=14.1,<15.0a0|9.|>=14.2,<15.0a0’]
torchaudio==0.7.0 → vc[version=‘>=14.1,<15.0a0’]
python=3.11 → bzip2[version=‘>=1.0.8,<2.0a0’] → vc=9
pytorch==1.7.0 → cudatoolkit[version=‘>=11.0,<11.1’] → vc[version=‘14.|9.|>=14.1,<15.0a0|>=14.2,<15.0a0’]
cudatoolkit=11.0 → vc[version=‘>=14.1,<15.0a0’]

Package zlib conflicts for:
torchvision==0.8.0 → libpng → zlib[version=‘>=1.2.11,<1.3.0a0|>=1.2.13,<1.3.0a0’]
python=3.11 → zlib[version=‘>=1.2.13,<1.3.0a0’]

Package cudatoolkit conflicts for:
pytorch==1.7.0 → cudatoolkit[version=‘>=10.1,<10.2|>=11.0,<11.1|>=10.2,<10.3’]

Package vs2015_runtime conflicts for:
cudatoolkit=11.0 → vc[version=‘>=14.1,<15.0a0’] → vs2015_runtime[version=‘>=14.15.26706|>=14.27.29016|>=14.16.27012’]
cudatoolkit=11.0 → vs2015_runtime[version=‘>=14.16.27012,<15.0a0’]

Package pytorch conflicts for:
torchvision==0.8.0 → pytorch==1.7.0
torchaudio==0.7.0 → pytorch==1.7.0

I wanted to also point towards the used Python version. Based on your last post, it seems you are using 3.11 so would need to downgrade as this older PyTorch build might not have supported 3.11 yet.