ModuleNotFoundError: No module named ‘pandas_datareader’

We are attempting to apply pandas_datareader in python and receive the ModuleNotFoundError: No module named ‘pandas_datareader’. The following article will give you a clear view of all the possible answers. Let’s find out how to resolve this error!

How Does The Error Appear?

As mentioned above, the error occurred when we utilized pandas_datareader. The error is described below.

ModuleNotFoundError: No module named 'pandas datareader'

How Do We Resolve “ModuleNotFoundError: No module named ‘pandas_datareader’”?

If you’re running python 3 with pip, execute the following command: pip3 install pandas-datareader. While running python 2 with pip, you run pip2 install pandas-datareader command. 

After successfully installing, you may apply import pandas_datareader as pdr. The error then should be resolved.

The Solutions

Solution 1

Try typing this command into your terminal if you’re running Python 3 with pip.

pip3 install pandas-datareader
python3 - m pip install pandas-datareader

Solution 2

Try typing this command into your terminal if you’re running Python 2 with pip.

pip2 install pandas-datareader
python2 - m pip install pandas-datareader

Solution 3

If you ‘re running Pip only, try executing this command into your terminal.

pip install pandas-datareader
python - m pip install pandas-datareader

Solution 4

You most likely installed the item for the incorrect Python version. Check that you’re using the correct pip. If you’re attempting to download the item for your python setup, you should use this command.

sudo python - m pip install pandas-datareader

After finishing the setup, use this line of code. It should fix your problem by now!

import pandas_datareader as pdr

Conclusion

Our blog post has helped you understand the solutions for ModuleNotFoundError: No module named ‘pandas_datareader’. If you feel you have any concerns or questions about the problem, please share them on the discussion forum. 

Also, please leave your best ideas and solutions to let us know which approach worked best for you. Thank you for reading. We are always pleased when one of our posts can provide useful information like this!


Related articles

Scroll to Top