ModuleNotFoundError: 没有名为“pandas"的模块 [英] ModuleNotFoundError: No module named 'pandas'

查看:91
本文介绍了ModuleNotFoundError: 没有名为“pandas"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习实用的机器学习教程,但我已经被第二个视频困住了.https://www.youtube.com/watch?v=JcI5Vnw0b2c&t=195s

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

 import pandas as pd
 import Quandl

 df = Quandl.get('WIKI/GOOGL')
 print(df.head())

当我运行与视频中的人相同的代码时,我得到的只是ModuleNotFoundError:没有名为‘pandas’的模块".我在使用 Visual Studio 2017 的 Windows 10 上安装了 pip 熊猫.我安装了 python 3.6.1.

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.

来自 C:\Program Files\Anaconda3\lib\site-packages (python 3.6) 的 pip 9.0.1.
大熊猫(0.19.2).
Python 3.6.0 :: Anaconda 4.3.0(64 位)

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)

推荐答案

我也遇到了这个问题并尝试了一些不同的方法,直到我意识到我在 settings.json (python.pythonPath) 下的 python 路径不正确并指向错误的目录.路径应该是 Python.exe 文件在程序下的位置.

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.

这篇关于ModuleNotFoundError: 没有名为“pandas"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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