无法在raspi3b中导入sklearn ImportError:numpy.core.multiarray无法导入

时间:2018-04-15 02:56:16

标签: python python-3.x numpy scikit-learn

我在我的raspi中使用python3。而且我无法在代码中使用sklearn工作或导入pproperly。我已经尝试在我的raspi上卸载所有numpy版本。然后只使用以下命令在python3中安装numpy: sudo apt-get install python3-numpy 但我仍然无法使其工作。请帮助我每个人:(

先谢谢你

这是导入sklearn时错误的回溯

>>> 

import sklearn
Traceback (most recent call last):
  File "__init__.pxd", line 987, in numpy.import_array
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/sklearn/__init__.py", line 134, in <module>
    from .base import clone
  File "/usr/local/lib/python3.5/dist-packages/sklearn/base.py", line 13, in <module>
    from .utils.fixes import signature
  File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/__init__.py", line 10, in <module>
    from .murmurhash import murmurhash3_32
  File "sklearn/utils/murmurhash.pyx", line 26, in init sklearn.utils.murmurhash
  File "__init__.pxd", line 989, in numpy.import_array
ImportError: numpy.core.multiarray failed to import

0 个答案:

没有答案