1

ModuleNotFoundError: No module named 'pandas_datareader'

Hello peeps, I need help with this ModuleNotFoundError: No module named 'pandas_datareader'. i have installed pandas_datareader more than 10x using pip install command but returns this error in both Pycharm and the default IDLE for python 3.7. I know there already a couple of threats on this forum addressing this issue, but non has helped me so far. Confession: I'm a newbie in python (40 hours experience so far)switching careers from petroleum engineering to programming.

import datetime
import pandas_datareader.data as web
import matplotlib.pyplot as plt
from matplotlib import style

style.use('fivethirtyeight')

start = datetime.datetime(2010, 1, 1)
end = datetime.datetime.now()

df = web.DataReader("XOM", "morningstar", start, end)

df.reset_index(inplace=True)
df.set_index("Date", inplace=True)
df = df.drop("Symbol", axis=1)

print(df.head())

df['High'].plot()
plt.legend()
plt.show()

This is the result it returns

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
============= RESTART: C:\Users\fred-PC\Desktop\data analysis.py =============
Traceback (most recent call last):
  File "C:\Users\fred-PC\Desktop\data analysis.py", line 3, in <module>
    import pandas_datareader.data as web
ModuleNotFoundError: No module named 'pandas_datareader'
Jeff
  • 11
  • 1
  • 2

4 Answers4

0

I am having the same issue. I use Anaconda under Win10, Spyder editor. if I do conda --list I see the package. There are there versions, an old one for py3.6, newer py3.7 and newest(0.7.1) for py 3.7 I use python 3.7. If I attempt to reinstall it, conda it says all requirement fulfilled and keeps it the same.

I have tried 3-4 scripts with same issue. If you have a resolution, I would appreciate anupdate. Will post here if I can figure it out.

tim hockswender
  • 53
  • 2
  • 10
0

If you are using Anaconda, just type on terminal:

conda install -c anaconda pandas-datareader
abdusco
  • 9,700
  • 2
  • 27
  • 44
0

Enter this on your start window page

'pip3 install pandas_datareader'

then run. The problem should be solved.

-1

Try this on terminal:

pip3 install pandas_datareader

If you're using Anaconda, just open its prompt and type: pip install pandas_datareader

André Pacheco
  • 1,780
  • 14
  • 19
  • i'm not using anaconda!!!! i tried uninstalling all the packages (pandas and pandas_datareader) and installing them but couldn't help. instead this time round, says pandas module not installed yet i went through all the processes – Jeff Feb 20 '19 at 13:09