Jupyter Notebook:没有名为pandas的模块 [英] Jupyter Notebook: no module named pandas

查看:1908
本文介绍了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:

ModuleNotFoundError:没有名为"pandas"的模块

ModuleNotFoundError: No module named 'pandas'

一些相关信息:

  • 我正在使用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 condawhich 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的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆