[英]JetBrains DataSpell ModuleNotFoundError error when package is installed
I use ipynb
-file.我使用
ipynb
文件。 When I try to import prophet
library I get this:当我尝试导入
prophet
库时,我得到了这个:
ModuleNotFoundError: No module named 'prophet'.
ModuleNotFoundError:没有名为“先知”的模块。
But this package is installed and it is in my current environment.但是这个包已经安装并且它在我当前的环境中。 Jupyter server's interpreter have
prophet
library. Jupyter 服务器的解释器有
prophet
库。 When I move cursor to name of library, DataSpell shows its info:当我将光标移动到库名称时,DataSpell 会显示其信息:
If I execute from prophet import Prophet
in python console everything is OK!如果我在 python 控制台中
from prophet import Prophet
执行from prophet import Prophet
一切正常! I think problem is in Jupyter notebook, but can't find it.我认为问题出在 Jupyter 笔记本上,但找不到。
最近碰到这个。这个答案<\/a>让我走上了正确的轨道。
我找到了默认的 jupyter 二进制文件: which jupyter<\/code> 。<\/li>
检查脚本: nano \/home\/<user>\/.local\/bin\/jupyter<\/code><\/li>
看到它安装的python环境:脚本顶部的#!\/usr\/bin\/python3.8<\/code><\/li>
从该环境中卸载jupyter<\/code> : python3.8 -m pip uninstall jupyter<\/code><\/li><\/ul>然后 DataSpell 使用了正确的jupyter<\/code>二进制文件(并且所有导入都运行良好)。
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.