完整列表:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-7dd3504c366f> in <module>()
----> 1 import pandas as pd
/usr/local/lib/python3.6/dist-packages/pandas/__init__.py in <module>()
40 import pandas.core.config_init
41
---> 42 from pandas.core.api import *
43 from pandas.core.sparse.api import *
44 from pandas.tseries.api import *
/usr/local/lib/python3.6/dist-packages/pandas/core/api.py in <module>()
6
7 from pandas.core.algorithms import factorize, unique, value_counts
----> 8 from pandas.core.dtypes.missing import isna, isnull, notna, notnull
9 from pandas.core.arrays import Categorical
10 from pandas.core.groupby.groupby import Grouper
ImportError: cannot import name 'isna'
这显然是从一行开始的:
import pandas as pd
当前版本:
pandas==0.23.4
我曾尝试回到0.22和0.19版本,但这并没有解决问题。
这是pip3展示大熊猫:
% pip3 show pandas
Name: pandas
Version: 0.23.4
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: http://pandas.pydata.org
Author: None
Author-email: None
License: BSD
Location: /usr/local/lib/python3.6/dist-packages
Requires: numpy, python-dateutil, pytz
Required-by: pandas-datareader
由Mike Palmice和Reddi Mohan共同解决
我尝试使用pip和pip3进行卸载和重新安装,但这没有帮助。然后,我使用了virtualenv并成功了。 Python3和Pandas 0.23.4。我不知道为什么。我以为他们在创建环境时就使用了相同的内容!
谢谢迈克和雷迪!