Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot import modules in jupyter notebook; wrong sys.path

Tags:

I am having a problem importing modules in my iPython/Jupyter notebook. The problem fundamentally lies in where the sys.path is pointing to.

From the iPython/Jupyter notebook, sys.executable returns:

'/usr/bin/python'

However, from the command line, it returns:

'//anaconda/bin/python'

I have tried un-installing and re-installing anacondas, but the problem still remains.

I have also tried augmenting $PYTHONPATH in my bash_profile to include //anaconda/bin/python, but this doesn't resolve it.

Is there anyway to change the sys.path in my jupyter notebook permanently, without simply using sys.path.append(...)?