3

enter image description here

I installed pytorch using anaconda3 and my created virtual conda environment named 'torchTest'. I installed all the modules needed but, codes doesn't work in jupyter python.

I installed torchtext using 1.pip install https://github.com/pytorch/text/archive/master.zip 2.and also pip install torchtext too. all I mentioned successfully downloaded in my MAC OS X, but can't get what's wrong with my Jupyter notebook..

dante
  • 933
  • 4
  • 16
  • 39

1 Answers1

2

After having the same issue with torchtext from within my jupyterlab, I opened an issue on Github at the jupyterlab project as well as at the torchtext repository.

My current solution is to add the PYTHONPATH from the Anaconda env.

The Anaconda path is usually like that $HOME/anaconda/bin

You can add it from within Jupyter Lab/Notebook like that:

import sys
sys.path.append("/some/path/to/add")

import torchtext
trtm
  • 61
  • 3