如何为熊猫解决“提高ImportError(“需要假设> = 3.58才能运行测试”)“?

时间:2019-09-23 19:07:07

标签: python pandas jupyter

由于我不断收到NameError: name 'pd' is not defined,因此无法将熊猫导入Jupyter笔记本。在仔细检查其他来源的同时,我相信这使我认为熊猫可能是问题所在。

我需要更新或更改什么?我也将Python升级到了最新版本。

这是我要测试的终端代码:

>>> import pandas as pd 
>>> pd.test()
Traceback (most recent call last):
  File "//anaconda2/lib/python3.7/site-packages/pandas/util/_tester.py", line 16, in test
    import hypothesis  # noqa
ModuleNotFoundError: No module named 'hypothesis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "//anaconda2/lib/python3.7/site-packages/pandas/util/_tester.py", line 18, in test
    raise ImportError("Need hypothesis>=3.58 to run tests")
ImportError: Need hypothesis>=3.58 to run tests```


1 个答案:

答案 0 :(得分:0)

我认为您缺少假设,请尝试“ conda安装假设”以使pd.test()工作。那使测试对我有用。