Cannot import modules in jupyter notebook; wrong sys.path

前端 未结 3 1191
囚心锁ツ
囚心锁ツ 2021-01-04 02:29

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/Jupyte

3条回答
  •  借酒劲吻你
    2021-01-04 03:10

    1. Open a new terminal window and see if this helps. If not, proceed with 2.

    2. Start a standard Python session from the terminal and type this:

      >>> import sys
      >>> sys.executable
      
    3. Do the same in the notebook:

      In [1]: import sys
              sys.executable
      
    4. Compare the results. Hopefully, this gives you a clue what is going on.

提交回复
热议问题