简体   繁体   English

ModuleNotFoundError:没有名为“pandas_datareader.utils”的模块

[英]ModuleNotFoundError: No module named 'pandas_datareader.utils'

I am trying to utilize pandas data reader in my program我正在尝试在我的程序中使用 pandas 数据读取器

from pandas_datareader import data 
from pandas_datareader.utils import RemoteDataError

but when i run it a get an error但是当我运行它时出现错误

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\pandas_datareader\compat\__init__.py:7: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  from pandas.util.testing import assert_frame_equal
Traceback (most recent call last):
  File ".\tradingBOT.py", line 2, in <module>
    from pandas_datareader.utils import RemoteDataError
ModuleNotFoundError: No module named 'pandas_datareader.utils'

I used pip to install pandas-datareader and it worked without a problem我使用 pip 来安装pandas-datareader并且没有问题

Instead of typing this:而不是输入这个:

    from pandas_datareader.utils import RemoteDataError

I tried this:我试过这个:

    from pandas_datareader._utils import RemoteDataError

I don't know if there's a difference, but everything seems to be working!我不知道是否有区别,但似乎一切正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM