Can't import pytorch
By Emma Johnson •
I am trying to import pytorch but I get an error that module does not exist. I installed via anaconda, and the folder "pytorch-0.1.12-py35_2cu80" exist in anaconda3/pkgs folder. why does it not recognize that it is there? should I rename this folder?
-Rik
/home/rik/anaconda3/bin/python /home/rik/PycharmProjects/self_driving_car/self_driving.py
Traceback (most recent call last): File "/home/rik/PycharmProjects/self_driving_car/self_driving.py", line 18, in <module> import pytorch
ImportError: No module named 'pytorch'
Process finished with exit code 1 2 2 Answers
The command to import pytorch is
import torchnot
import pytorch It seems the module pytorch is not installed.
First make sure your using anaconda's python and not the system one.
To install pytorch via conda do
conda install pytorch torchvision -c soumith
or via pip
For python3
pip install
pip install torchvisionFor python2
pip install
pip install torchvisiondont install the CUDA version if you dont have Nvidia GPU on your machine that supports.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"