安装Scikit-learn:ValueError: numpy.dtype has the wrong size, try recompiling解决
2016-08-24 17:22
826 查看
今天在尝试使用scikit-learn的
以为是
网上给的建议大都是直接卸载再全部重装,将
装起来。结果一样有问题-_-
继续查资料时终于发现有用的方法了:
http://scikit-learn-general.narkive.com/kMA6mRCk/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling
就是不用使用
ps:这个时候直接安装可能会出
Error提示,这时候安装一下
最后全部安装完之后就可以正常使用了^_^
本文转载自:http://kubicode.me/2016/04/22/Python/Solve-numpy-dtype-In-ValueError-when-using-scikit-learn/
AdaBoost模型时一直报错,
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/sklearn/__init__.py", line 57, in <module> from .base import clone File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in <module> from .utils.fixes import signature File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py", line 10, in <module> from .murmurhash import murmurhash3_32 File "numpy.pxd", line 155, in init sklearn.utils.murmurhash (sklearn/utils/murmurhash.c:5029) ValueError: numpy.dtype has the wrong size, try recompiling
以为是
numpy包的问题:卸载重装之后还是照样有问题-_-
网上给的建议大都是直接卸载再全部重装,将
numpy、
scipy和
scikit-learn全部卸载了,然后
pip install -U numpy scipy scikit-learn
装起来。结果一样有问题-_-
继续查资料时终于发现有用的方法了:
http://scikit-learn-general.narkive.com/kMA6mRCk/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling
就是不用使用
pip install scikit-learn安装,卸载之后直接使用git上
https://github.com/scikit-learn/scikit-learn的自己安装
git clone https://github.com/scikit-learn/scikit-learn make sudo python setup.py install
ps:这个时候直接安装可能会出
RuntimeError: Running cythonize failed!
Error提示,这时候安装一下
cpython即可
pip install cython
最后全部安装完之后就可以正常使用了^_^
本文转载自:http://kubicode.me/2016/04/22/Python/Solve-numpy-dtype-In-ValueError-when-using-scikit-learn/
相关文章推荐
- mac OS X10.11.5安装scikit-learn后运行出现ValueError: numpy.dtype has the wrong size的错误
- 【问题】ValueError: numpy.dtype has the wrong size, try recompiling解决2
- 【问题】ValueError: numpy.dtype has the wrong size, try recompiling解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- 64位windows下的python+numpy+scipy+scikit-learn安装
- window下安装Python的机器学习包numpy+scipy+matplotlib+scikit-learn
- Python2.7.11安装matplotlib,numpy,scikit-learn等其他包,w7x86x64下无问题
- 机器学习之pip安装scikit-learn问题解决
- apache 使用之三(解决安装后出现的问题 the requested operation has failed)
- windows下安装xgboost numpy scipy scikit-learn matplotlib
- linux下python的机器学习包scikit-learn(包含numpy、scipy等)安装
- 安装scikit-learn,win7 64位 (装了一下午,终于搞定了)解决ImportError: DLL load failed