我在虚拟环境中工作.我能够导入和使用pandas没有任何错误,但是当我尝试导入pandas_datareader时
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import datetime as dt
from matplotlib import style
import pandas_datareader as web
它给出了以下错误 –
Traceback (most recent call last):
File "stock.py", line 6, in
import pandas_datareader as web
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/__init__.py", line 2, in
from .data import (DataReader, Options, get_components_yahoo,
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/data.py", line 14, in
from pandas_datareader.fred import FredReader
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/fred.py", line 1, in
from pandas.core.common import is_list_like
ImportError: cannot import name 'is_list_like'
(env) xxxxx@xxxxx-yyyyy ~/pyt $python stock.py
Traceback (most recent call last):
File "stock.py", line 6, in
import pandas_datareader
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/__init__.py", line 2, in
from .data import (DataReader, Options, get_components_yahoo,
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/data.py", line 14, in
from pandas_datareader.fred import FredReader
File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/fred.py", line 1, in
from pandas.core.common import is_list_like
ImportError: cannot import name 'is_list_like'