I have installed pytorch using following command
pip install --user torchvisionBut When I try to import it I am getting error
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named torchAlso it says that all the requirements are satisfied
Requirement already satisfied: torchvision in ./.local/lib/python3.6/site-packages (0.2.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from torchvision) (1.10.0)
Requirement already satisfied: torch in ./.local/lib/python3.6/site-packages (from torchvision) (0.4.0)
Requirement already satisfied: pillow>=4.1.1 in ./.local/lib/python3.6/site-packages (from torchvision) (5.2.0)
Requirement already satisfied: numpy in ./.local/lib/python3.6/site-packages (from torchvision) (1.14.5)What should I do?
21 Answer
Visit torch - PyPi.
Click the "Download files" link.
Clicking the "Download files" link will expose the torch file to download. At the time of posting this answer the name of the torch file is: torch-0.4.1.post2-cp37-cp37m-manylinux1_x86_64.whl.
Open the terminal and type:
pip3 install pip3 install --user torchvisionStart the Python 3 interpreter with the command
python3and from the python3 prompt type:import torch