简体   繁体   English

导入 pandas - ModuleNotFoundError:没有名为“numpy.testing.decorators”的模块

[英]import pandas - ModuleNotFoundError: No module named 'numpy.testing.decorators'

I'm having troubles importing pandas:我在导入 pandas 时遇到问题:

import pandas

--- 

In [7]: import pandas

Traceback (most recent call last):

File "<ipython-input-7-d6ac987968b6>", line 1, in <module>
import pandas

File "//anaconda/lib/python3.6/site-    packages/pandas/__init__.py", line 56, in <module>
import pandas.util.testing

 File "//anaconda/lib/python3.6/site-  packages/pandas/util/testing.py", line 22, in <module>
from numpy.testing.decorators import slow     # noqa

ModuleNotFoundError: No module named 'numpy.testing.decorators'    

I recently fully reinstalled anaconda with home-brew;我最近用自制软件完全重新安装了 anaconda; moreover, I installed the following:此外,我安装了以下内容:

  • pip install numpy==1.18 pip 安装 numpy==1.18
  • pip install scipy==1.1.0 pip 安装 scipy==1.1.0
  • pip install scikit-learn==0.21.3 pip 安装 scikit-learn==0.21.3
  • pip install pandas pip 安装 pandas

The pandas version I'm using is 0.25.1我使用的 pandas 版本是 0.25.1

Does anyone have an idea of what might be going wrong?有谁知道可能出了什么问题?

Upgrade to pandas 1.0.0 (If you have no other reason not to) via,通过以下方式升级到pandas 1.0.0 (如果您没有其他理由不这样做),

pip install -U pandas

See if it helps.看看它是否有帮助。

pip uninstall numpy
pip install numpy==1.17.0

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

相关问题 Python:没有名为 numpy.testing.decorators 的模块用于 numpy 1.19.4 - Python: No module named numpy.testing.decorators for numpy 1.19.4 ModuleNotFoundError:没有名为“numpy.testing”的模块 - ModuleNotFoundError: No module named 'numpy.testing' ModuleNotFoundError:没有名为“numpy.testing.nosetester”的模块 - ModuleNotFoundError: No module named 'numpy.testing.nosetester' 将 pandas 导入为 pd ModuleNotFoundError:没有名为“pandas”的模块 - import pandas as pd ModuleNotFoundError: No module named 'pandas' ModuleNotFoundError:没有名为 pandas 的模块 - ModuleNotFoundError: No module named pandas ModuleNotFoundError:没有名为“pandas”的模块 - ModuleNotFoundError: No module named 'pandas' 无法通过PyCharm:ModuleNotFoundError导入熊猫:没有名为“ pandas”的模块 - Cannot import pandas through PyCharm:ModuleNotFoundError: No module named 'pandas' Pandas 导入:ModuleNotFoundError:没有名为“pandas._libs.tslib”的模块 - Pandas Import : ModuleNotFoundError: No module named 'pandas._libs.tslib' ModuleNotFoundError:matplotlib 导入时没有名为“numpy.core._multiarray_umath”的模块 - ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' on matplotlib import 导入模块:ModuleNotFoundError:没有模块命名 - Import Module : ModuleNotFoundError: No module named
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM