Python Pycharm 中没有名为“pandas”的模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38376351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 20:42:04  来源:igfitidea点击:

No module named 'pandas' in Pycharm

pythonpandasmodulepycharmsklearn-pandas

提问by ElenaPhys

I read all the topics about, but I cannot solve my problem:

我阅读了有关的所有主题,但无法解决我的问题:

     Traceback (most recent call last):
     File "/home/.../.../.../reading_data.py", line 1, in <module>
     import pandas as pd
     ImportError: No module named pandas     

This is my environment:

这是我的环境:

Ubuntu 14.04

Ubuntu 14.04

Pycharm version: 2016.1.4

pycharm 版本:2016.1.4

Python version: 2.7.10

Python版本:2.7.10

Pandas version: 0.18.1

熊猫版本:0.18.1

Pandas works in Anaconda, in Jupyter too. Anyone could suggest me how to fix the problem?

Pandas 在 Anaconda 中工作,也在 Jupyter 中工作。任何人都可以建议我如何解决问题?

回答by Lisa

Have you select the project interpreter for your current project? https://www.jetbrains.com/help/pycharm/2016.1/configuring-python-interpreter-for-a-project.html

您是否为当前项目选择了项目解释器? https://www.jetbrains.com/help/pycharm/2016.1/configuring-python-interpreter-for-a-project.html

follow this link, check whether pandas listed in the packages.

按照此链接,检查包中是否列出了熊猫。

回答by Mitchell

you can add a new project interpreter if you are using PyCharm ( IDE) . I install Anaconda first.

如果您使用的是 PyCharm (IDE),您可以添加一个新的项目解释器。我先安装 Anaconda。

1) go to File and click on Setting 2) go to project XXX ( right below Version Control) 3) click project interpreter 4) click the top right button ( lined up with project interpreter )

1)转到文件并单击设置 2)转到项目XXX(版本控制正下方) 3)单击项目解释器 4)单击右上角的按钮(与项目解释器对齐)

add new project interpreter - Anaconda3/python.exe

添加新的项目解释器 - Anaconda3/python.exe

add new project interpreter - Anaconda3/python.exe

添加新的项目解释器 - Anaconda3/python.exe

回答by Muhammad Usama

YOu are missing the libraries / Packages should be included in your project interpreter. add the libraries there all will be fine.

您缺少项目解释器中应包含的库/包。添加库那里一切都会好起来的。