Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'pandas'

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())

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.

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)

like image 488
Erick Eaton Avatar asked Jun 20 '17 06:06

Erick Eaton


People also ask

How do I fix ModuleNotFoundError No module named pandas?

The Python "ModuleNotFoundError: No module named 'pandas'" occurs when we forget to install the pandas module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install pandas command.

Why it is showing no module named pandas?

The error “No module named pandas ” will occur when there is no pandas library in your environment IE the pandas module is either not installed or there is an issue while downloading the module right.

Why does import pandas not work?

In most cases this error in Python generally raised: You haven't installed Pandas explicitly with pip install pandas. You may have different Python versions on your computer and Pandas is not installed for the particular version you're using.


2 Answers

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.

like image 196
wolfblitza Avatar answered Oct 10 '22 19:10

wolfblitza


I had a similar problem which I fixed by doing

pip3 install pandas

Instead of

pip install pandas
like image 28
Ramen Noodles Avatar answered Oct 10 '22 18:10

Ramen Noodles