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
If an error comes then try to search for the torch and install it otherwise it is successfully installed. If you are seeing an error like this “Error occurred when installing Package Pytorch“. Then you should install Pytorch through Pycharm Terminal. That's all you have to do for installing Pytorch in Pycharm.
Python. Currently, PyTorch on Windows only supports Python 3.7-3.9; Python 2.x is not supported.
In addition to that, PyTorch can also be built with support of external libraries, such as MKL and MKL-DNN, to speed up computations on CPU.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With