Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Pytorch in Pycharm terminal, Python 3.10 .win 10

I go to pytorch site and take this

pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

I have windows 10 ,Python version is 3.10 ,CUDA version is 11.5

And I get this error

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

I really struggled and tried to solve it, Please help.

like image 222
Ahmed Samir Avatar asked Nov 03 '21 13:11

Ahmed Samir


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 install PyTorch in PyCharm?

Select your current project. Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "torch" without quotes, and click Install Package .

How do I install PyTorch from terminal?

To install PyTorch, you have to run the installation command of PyTorch on your command prompt. This command is available on https://pytorch.org/. Select language and cuda version as per your requirement. Now, run python -version, and Conda -version command to check Conda and python packages are installed or not.


1 Answers

Check out the official issue on Pytorch's Github repository. I've tried your exact command on python 3.9.5 and it works. I believe the issue is that PyTorch is not supported by python 3.10 yet.

Downgrading to any 3.9 version of Python should solve your problem.

like image 146
Eternal E'lir Avatar answered Oct 16 '22 08:10

Eternal E'lir