简体   繁体   English

Jupyter Notebook中没有名为Pandas的模块

[英]No module named Pandas in Jupyter Notebook

I know there is a huge number of questions on this topics, but not even one worked for me, not here, not on github. 我知道有关此主题的问题很多,但没有一个问题对我有用,不在这里,不在github上。

I have installed anaconda2 for macOS a few days before. 我几天前已经为macOS安装了anaconda2。 I know pandas come with Anaconda by default, and in the last year I haven't any trouble with any python package on Ubuntu, but now I have a weird problem. 我知道默认情况下Anaconda附带有熊猫,并且在去年我在Ubuntu上的任何python包都没有遇到任何麻烦,但是现在我遇到了一个奇怪的问题。 When I run jupyter notebook and import pandas as pd , I got an error: no module named pandas . 当我运行jupyter notebook并将import pandas as pd ,出现错误: no module named pandas It's not just about pandas, none of libraries work. 这不只是关于熊猫,没有图书馆可以工作。

When I try to install pandas with conda, return me Requirement already satisfied . 当我尝试用conda安装熊猫时,还给我Requirement already satisfied The same with pip. 点子一样。 Also, I have tried to run jupyter notebook with a full path to jupyter package, and doesn't help either. 另外,我试图用完整的jupyter包路径来运行jupyter notebook,但也无济于事。 Probably there is a problem with PATH, but I'm not really good with that and not sure what to do. PATH可能存在问题,但是我对此并不满意,也不确定该怎么做。

But everything works fine when I run iPython in terminal, python in terminal, just doesn't work in jupyter notebook. 但是,当我在终端中运行iPython,在终端中运行python时,一切工作正常,只是在jupyter笔记本中不起作用。

> python --version
: Python 2.7.15 :: Anaconda, Inc.

> which python :/anaconda2/bin/python

> which jupyter-notebook:
/anaconda2/bin/jupyter-notebook

> conda env list:
 conda environments:
base                  *  /anaconda2

Thanks for any help in advance. 感谢您的任何帮助。

在jupyter单元格中尝试以下操作:

!pip install pandas

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

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