5

Following this https://pytorch.org/get-started/previous-versions/#via-pip

pip install torch==0.2.0_4 -f https://download.pytorch.org/whl/cpu/stable Collecting torch==0.2.0_4 Could not find a version that satisfies the requirement torch==0.2.0_4 (from versions: 0.1.2, 0.1.2.post1, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0) No matching distribution found for torch==0.2.0_4 

How to install older version of pytorch?

2

2 Answers 2

6
pip install torch== Collecting torch== 

ERROR: Could not find a version that satisfies the requirement torch== (from versions: 0.1.2, 0.1.2.post1, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0) ERROR: No matching distribution found for torch==

This means that version 0.2 is not available

You can download the specific version (wheels seem available) and install it with pip install

Sign up to request clarification or add additional context in comments.

3 Comments

How to install suitable torchvision version? pip install torchvision installs some other pytorch version over version installed by whl.
Not sure to have understood. Anyway, the best is to create a virtuaenv and install the versions you require for each package in order not to have conflicts.
For my case it seems pip install torchvision==0.2.0 --no-deps --no-cache-dir
1

This works for me:

conda install pytorch==1.7.1 torchvision cudatoolkit=10.2 -c pytorch 

note I also specified the cuda version too.

Note this was asked on the pytorch forum too: https://discuss.pytorch.org/t/how-to-switch-to-older-version-of-pytorch/19656/21

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.