Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install torch==0.3.1 in python=3.6

I am trying to install deepmatcher package in python 3.6. To let this package to run in python you need have a torch==0.3.1 version. So I am trying to install torch==0.3.1 by running :

pip install torch==0.3.1 

Error during installation:

Collecting torch==0.3.1
ERROR: Could not find a version that satisfies the requirement torch==0.3.1 (from versions: 0.1.2, 0.1.2.post1)
ERROR: No matching distribution found for torch==0.3.1

I even tried installing it using "peterjc123" package but still unable to uninstall it.

like image 408
Shikha Singh Avatar asked May 17 '19 07:05

Shikha Singh


People also ask

Does Python 3.10 support PyTorch?

We've just released a new version of fastai, which adds support for pytorch 1.11 (which means fastai now supports python 3.10).

Can I pip install PyTorch?

Package ManagerTo install the PyTorch binaries, you will need to use one of two supported package managers: Anaconda or pip.


1 Answers

torch 0.3.1 is not listed official anymore. To install torch 0.3.1 one can either build it by source or using a whl file for the specific version.

Using a whl file

whl files can be found here provided by pytorch

The downloaded file can then be installed with pip install [path to downloaded file]


Build by source

To build torch by source one can checkout the desired version via git

git checkout v[version number]

For torch==0.3.1 this would be git checkout v0.3.1

After this follow the install instructions provided by README.md


More information can be found at: https://pytorch.org/get-started/previous-versions/

like image 179
WUUUGI Avatar answered Sep 24 '22 16:09

WUUUGI