I was eventually able to fix this issue looking at the results of this: import sys print(sys. If I understood the linked article correctly, am I right to assume that instead of using source activate other-env as my first line, I should reference my environment by saying source activate pytorchenv followed by python -m ipykernel install --user --name Level up your programming skills with exercises across 52 languages, and insightful discussion with our dedicated team of welcoming mentors. path both in the prompt Feb 23, 2019 · I then ran into the No module named "torch" issue and spent many hours looking into this. path) For me, this showed that the path to site-packages for my kernal (aka Environment) was missing. Malan Hi there, I think I discovered another bug with project 1 and 2. I checked the sys. Oct 6, 2024 · If you've encountered the error "ModuleNotFoundError: No module named 'torch'" when trying to import PyTorch in your Python script, don't worry. aot on my Ubuntu setup (CPU bankend). Aug 31, 2019 · I had the same problem where the jupyter lab couldn't import torch after successful installation in my virtual environment. 08.