Can´t install Pytorch on PyCharm: No matching distribution found for torch==1.7.0+cpu

梦想的初衷 提交于 2021-01-03 05:55:10

问题


I tried multiple times installing Pytorch on Pycharm. I used the code that the pytorch web site give you for a specific configuration. I use this one: enter image description here

Then I copied this information on Pycharm Terminal and I get this message:

(venv) D:\Usuarios\AuCap\Documents\mnist>pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/w hl/torch_stable.html Looking in links: https://download.pytorch.org/whl/torch_stable.html ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch==1.7.0+cpu

I also tried installing it using Python interpreter in the Pycharm Settings and also didnd´t work.

Thanks for your help


回答1:


Downgrade your Python version as python3.9 is not supported by PyTorch right now (python3.8 is fine though). See this issue, it will be supported in subsequent releases.

You can build your own PyTorch from source if you wish though.




回答2:


Try using "Repair" option in Python Setup Window (Windows options -> Apps -> Find Python -> Modify -> Repair).

I had exactly the same problem and it worked for me.

PS: also make sure you have Python 64-bit version



来源:https://stackoverflow.com/questions/64636103/can%c2%b4t-install-pytorch-on-pycharm-no-matching-distribution-found-for-torch-1-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!