繁体   English   中英

我无法在 MacOS 上的 Jupyter Notebook 中导入新模块

[英]I can't import new modules in Jupyter Notebook on MacOS

sys.executable 的值在sys.executable Notebook 和终端上都是/usr/local/opt/python@3.10/bin/python3.10 但是终端中的pip3 list给了我一个与 Jupyter Notebook 中help('modules')不同的列表

我认为 Jupyter 从/Users/matdou/virtualenvs/Jupyter Jupyter 获取我的模块,但我认为有一天我在 $PATH 中错误地删除了路径。 现在我的模块 go 在其他地方。

我该如何解决这个问题?

当我使用 pip 时,我没有得到的另一件事是此错误消息:

WARNING: The scripts pip, pip3 and pip3.8 are installed in '/Users/matdou/Library/Python/3.8/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

好的,pip3 使用的是 python2.7,问题解决了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM