Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 views
in Technique[技术] by (71.8m points)

python - Module Not found Error, but cmd says it's already installed

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...