问题
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