ModuleNotFoundError: 没有名为“pandas”的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44645433/
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
ModuleNotFoundError: No module named 'pandas'
提问by Erick Eaton
I'm following a practical machine learning tutorial and I am already stuck on the second video. https://www.youtube.com/watch?v=JcI5Vnw0b2c&t=195s
我正在学习实用的机器学习教程,但我已经被第二个视频困住了。 https://www.youtube.com/watch?v=JcI5Vnw0b2c&t=195s
import pandas as pd
import Quandl
df = Quandl.get('WIKI/GOOGL')
print(df.head())
When I run the same code as the man in the video, all I get is "ModuleNotFoundError: No module named 'pandas'". I'm on windows 10 using Visual Studio 2017 and I have pip installed pandas. I have python 3.6.1 installed.
当我运行与视频中的人相同的代码时,我得到的只是“ModuleNotFoundError:没有名为‘pandas’的模块”。我在使用 Visual Studio 2017 的 Windows 10 上安装了 pip Pandas。我安装了 python 3.6.1。
pip 9.0.1 from C:\Program Files\Anaconda3\lib\site-packages (python 3.6).
pandas (0.19.2).
Python 3.6.0 :: Anaconda 4.3.0 (64-bit)
pip 9.0.1 从 C:\Program Files\Anaconda3\lib\site-packages (python 3.6)。
Pandas(0.19.2)。
Python 3.6.0 :: Anaconda 4.3.0(64 位)
回答by wolfblitza
I had this problem as well and tried a few different things until I realized my python path under settings.json (python.pythonPath) was incorrect and pointing to the wrong directory. The path should be to where the Python.exe file is under programs.
我也遇到了这个问题并尝试了一些不同的方法,直到我意识到 settings.json (python.pythonPath) 下的 python 路径不正确并指向错误的目录。路径应该是 Python.exe 文件在程序下的位置。
回答by Ramen Noodles
I had a similar problem which I fixed by doing
我有一个类似的问题,我通过做
pip3 install pandas
Instead of
代替
pip install pandas
回答by Jasong
I think you can use conda update pandas and it should get the most current version for you dist. Or, pip install --update pandas Also in python 3 quandl will be lowercase. Edit.. pandas in on ver. 0.21.0 currently.
我认为您可以使用 conda update pandas,它应该为您获取最新版本的 dist。或者, pip install --update pandas 在 python 3 中 quandl 也会是小写的。编辑..Pandas在版本。当前为 0.21.0。
回答by v_kumar
To make sure that you're using the same pip
as your python
, execute
the pip
with whole path
from python directory
i.e.
为了确保您使用的是相同的pip
作为python
,execute
将pip
与全path
从python directory
即
C:\Program Files\Anaconda3\lib\site-packages (python 3.6)\pip install pandas
This will install the pandas
in the same directory
这将安装pandas
在同一目录中
Or C:\Python365\pip install pandas
Or C:\Python27\pip install pandas
Whichever Python
you wand to use and install
the pandas
无论Python
你的魔杖的使用和install
对pandas
If you want to use a specific version of Python in Windows cmd
, just add the path
of that Python
in System Variables
.
如果你想使用一个Python的特定版本Windows cmd
,只需添加path
的那个Python
中System Variables
。