I installed pytorch via
conda install pytorch-cpu torchvision-cpu -c pytorch
And I also tried
pip3 install https://download.pytorch
Usually if the torch/tensorflow has been successfully installed, you still cannot import those libraries, the reason is that the python environment you try to import is not the python environment you installed.
For example, if you have installed the torch/tensorflow using python='/usr/bin/python'
, then you cannot import them to python='/home/usrname/.../bin/python'
.
The solution is simple thus, just change the python and import again.