IPython sys.path different from python sys.path

后端 未结 3 1267
渐次进展
渐次进展 2020-12-19 06:12

I generally use IPython and only recently noticed that the the search path for imports is wrong in the regular python shell. From what I understand, sys.path inherits from P

3条回答
  •  余生分开走
    2020-12-19 07:00

    You may have your virtual environment activated which is ignoring the system path.

    It can be fixed by running this in terminal (After closing notebook etc):

    virtualenv --system-site-packages ~
    

提交回复
热议问题