sys.path different in Jupyter and Python - how to import own modules in Jupyter?

后端 未结 5 1730
一向
一向 2020-11-30 01:29

In Jupyter my own little module is not loaded but in python/bpython is everything is fine. When typing

import sys
print(sys.path)

the path

5条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 02:15

    Jupyter has its own PATH variable, JUPYTER_PATH.

    Adding this line to the .bashrc file worked for me:

    export JUPYTER_PATH=:$JUPYTER_PATH
    

提交回复
热议问题