本文介绍了Jupyter Notebook:没有名为pandas的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我搜索了其他问题,但没有找到任何帮助(大多数建议您确实使用conda或pip安装熊猫).在我的Jupyter笔记本中,我正在尝试导入熊猫(import pandas as pd
)但出现以下错误:
I've searched through other questions but have not found anything that has helped (most just suggest you do install pandas with conda or pip). In my jupyter notebook I'm trying to import pandas (import pandas as pd
)but I'm getting the following error:
一些相关信息:
- 我正在使用python3
- 我已经使用
conda install pandas
安装了熊猫 - 我的conda环境已正确安装了熊猫.激活环境后,我在终端中键入
python
,然后可以从那里成功导入熊猫并正确使用它.这使我相信这是我的Jupyter笔记本电脑出现的问题.
- I'm using python3
- I've installed pandas using
conda install pandas
- My conda environment has pandas installed correctly. After activating the environment, I type
python
into the terminal and from there I can successfully import pandas and use it appropriately. This leads me to believe that it is an issue with my jupyter notebook.
推荐答案
您可以尝试:which conda
和which python
来查看conda和python的安装以及启动位置.
You can try: which conda
and which python
to see the exact location where conda and python was installed and which was launched.
并尝试使用conda的绝对路径启动jupyter.
And try using the absolute path of conda to launch jupyter.
例如/opt/conda/bin/jupyter notebook
这篇关于Jupyter Notebook:没有名为pandas的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!