在导入pandas时出现错误"无法导入名称'nosetester'"

5

在导入pandas时,我遇到以下错误:

无法导入名称为“nosetester”的模块 Traceback (most recent call last): File "/usr/bin/anaconda/envs/py35/lib/python3.5/site-packages/pandas/init.py", line 56, in from pandas.util.nosetester import NoseTester File "/usr/bin/anaconda/envs/py35/lib/python3.5/site-packages/pandas/util/nosetester.py", line 13, in from numpy.testing import nosetester ImportError: cannot import name 'nosetester'

Pandas版本 ->0.18.1 Numpy版本 ->1.18.0

请问如何解决这个错误?

1个回答

1
一种方法是使用Python 3.6版本,比如3.6.5是一个稳定的版本。
另一种方法是如果您想继续使用Python 3.5版本本身,则Python 3.5.2可以正常工作。

谢谢nages!! 看起来numpy版本和pandas版本不匹配。所以我安装了numpy 1.11.1版本和pandas 0.19.2版本,这对我有用。 - jaganreddy
谢谢Jagan!是的,有时我们需要找出numpy和pandas之间的匹配版本。 - Nages

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接