I have just installed pandas_datareader
using pip install pandas-datareader
which ran successfully.
Now I am trying to use it for a tutorial and I am getting this error when I try to import.
import pandas_datareader as pdr
ModuleNotFoundError: No module named 'pandas_datareader'
This is the link to the tutorial.
https://www.datacamp.com/community/tutorials/finance-python-trading#gs.DgsO1BY
Any ideas?
pip
. Usually the safest thing to do is to run:sudo python3 -m pip install pandas_datareader
if you are trying to install the package for your python3 installation. – Sergiasunix
machine (mac, ubuntu or what not). But you should be able to use the same command, except for thesudo
prefix:python3 -m pip install pandas_datareader
. You can use--upgrade
to make sure you are getting the latest version of the package. Please don't assume that--upgrade
is for upgrading python's version. It's mainly to make sure you are installing the latest version of the package. – Sergiasspyder
and runimport sys; sys.executable
. This should tell you where your python installation is. You can then use that path to call pip. Instead ofpython3 -m pip install pandas_datareade
, you can replacepython3
with the output ofsys.executable
. – Sergiaspip3 install pandas_datareader
– Sliestconda install
, not available. I triedpip install
, already installed. After a reboot of the machine, it is now back to work. Hope this helps! – Cori