installed pytorch with conda :
(base) (3.8.0/envs/my_virtual_env-3.8.0) marco@pc:~/facenet_pytorch/examples$ conda install
pytorch torchvision cpuonly -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
I updated conda:
(base) (3.8.0/envs/my_virtual_env-3.8.0) marco@pc:~/facenet_pytorch/examples$ conda update
conda
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
Installed mkl=2019 :
(base) (3.8.0/envs/my_virtual_env-3.8.0) marco@pc:~/facenet_pytorch/examples$ conda install
mkl=2019
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(base) (3.8.0/envs/my_virtual_env-3.8.0) marco@pc:~/facenet_pytorch/examples$ conda list | grep
torch
cpuonly 1.0 0 pytorch
facenet-pytorch 0.1.0 pypi_0 pypi
pytorch 1.3.0 py3.7_cpu_0 [cpuonly] pytorch
torchfile 0.1.0 pypi_0 pypi
torchvision 0.4.1 py37_cpu [cpuonly] pytorch
But it still says "no module torch" :
(base) (3.8.0/envs/my_virtual_env-3.8.0) marco@pc:~/facenet_pytorch/examples$ python3
Python 3.8.0 (default, Oct 30 2019, 16:20:23)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'
>>>
I discovered that the problem appears only with python 3.8.0 version
(base) marco@pc:~/facenet_pytorch$ python3
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>>
Ubuntu 18.04.02 Server Edition
Or, may be, it's just a matter of python environments, as you said. But I do not understand why just activating conda environment, with "conda activate", it doesn't work
Marco