[英]jupyter notebook - ImportError: No module named 'bson'
Trying to play with some jupyter notebook, I have an issue with the bson module which seams not available as reported in the error: "ImportError: No module named 'bson'" 尝试使用一些jupyter笔记本电脑时,我遇到了bson模块的问题,该接缝在错误中报告为不可用:“ ImportError:没有名为'bson'的模块”
I'm running jupyter notebook 4.3.0 over a python 2.7 kernel which is available in a dedicated virtual environment. 我正在通过专用虚拟环境中可用的python 2.7内核运行jupyter Notebook 4.3.0。 I tried to install manually the bson module through a simple "conda install bson" but it's not in the official/standard repo so I had to install OpenMDAO/bson. 我试图通过一个简单的“ conda install bson”手动安装bson模块,但是它不在官方/标准仓库中,因此我必须安装OpenMDAO / bson。 Finally, it didn't change the issue. 最后,它并没有改变问题。 I understand that the module might come from the pymongo package so I tried to install with the same result. 我了解该模块可能来自pymongo软件包,因此我尝试以相同的结果进行安装。
Any hint here? 这里有什么提示吗? What's the link between bson and pymongo? bson和pymongo之间有什么联系?
You can advise this answer: import error: no module named bson 您可以建议以下答案: 导入错误:没有名为bson的模块
Which states that: 其中指出:
If you don't get the
no module named bson
error but theEPOCH_AWARE import error
, this is due to a name clash between bson and pymongo. 如果您没有收到no module named bson
的no module named bson
错误,但没有收到EPOCH_AWARE import error
,这是由于bson和pymongo之间的名称冲突引起的。
In this case, you should do these in order: 在这种情况下,您应该按以下顺序进行操作:
sudo pip uninstall bson
sudo pip uninstall pymongo
sudo pip install pymongo
In your case, try to start with a fresh virtualenv and do the above mentioned in the given order 在您的情况下,请尝试从全新的virtualenv开始,并按给定顺序执行上述操作
That also answers the link between bson and pymongo. 这也回答了bson和pymongo之间的联系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.