anaconda: No module named ‘torch’

Valery Yakovlev
1 min readApr 9, 2019

Another beginner error I encountered when started to use pytorch in anaconda environment

>import torchModuleNotFoundError: No module named ‘torch’

the proper way to install pytorch to anaconda is following

conda install -c pytorch pytorch

It’s not enough to simply run “conda install pytorch” — the package won’t be found. So first activate your conda profile with “source activate {your_profile}” and then run the command conda install -c …

--

--

Valery Yakovlev

Notes on Java development. Tech: Java 8, Spring Boot, Postgres, Cassandra, Elasticsearch