I was trying to run the following command to get some finance data online:
import pandas as pd
from pandas_datareader import data
import matplotlib.pyplot as plt
import seaborn
import plotly.express as px
gol_df = data.DataReader(name = 'GOLL4.SA', data_source = 'yahoo', start='2015-01-01')
But before I could proceed I got the error listed below;
In [3]: runfile('C:/Users/User/.spyder-py3/temp.py', wdir='C:/Users/User/.spyder-py3')
Reloaded modules: jupyter_client.session, zmq.eventloop, zmq.eventloop.ioloop, tornado.platform, tornado.platform.asyncio, tornado.gen, zmq.eventloop.zmqstream, jupyter_client.jsonutil, jupyter_client.adapter, spyder, spyder.pil_patch, PIL, PIL._version, PIL.Image, PIL.ImageMode, PIL.TiffTags, PIL._binary, PIL._util, PIL._imaging, cffi, cffi.api, cffi.lock, cffi.error, cffi.model
Traceback (most recent call last):
File "C:UsersUser.spyder-py3emp.py", line 9, in <module>
from pandas_datareader import data
ModuleNotFoundError: No module named 'pandas_datareader'
This happens not only with pandas_datareader
, but also with seaborn
and plotly
. Besides that, I also get a name error:
NameError: name 'data' is not defined
.
When I try to reinstall these packages using pip
it says that they're already installed and working. What else can I do?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…