내가지고있어 오류가 될 때 :깨진 NumPy와/scipy 설치 (파이썬은 우분투 10.04) 다음
$ python -c 'from sklearn import preprocessing'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.10-py2.6-linux-x86_64.egg/sklearn/preprocessing/__init__.py", line 17, in <module>
from ..utils.sparsefuncs import inplace_csr_row_normalize_l1
File "numpy.pxd", line 174, in init sklearn.utils.sparsefuncs (sklearn/utils/sparsefuncs.c:4605)
ValueError: numpy.ndarray has the wrong size, try recompiling
이를 내가 믿는이
(here 참조) numpy
보다는 scikitlearn
에 오류가 git clone을 사용하여 scipy
및 numpy
의 dev 버전을 사용하고있었습니다 (제대로 작동했습니다). 그러나 릴리스 용 안정 버전으로 "다운 그레이드"해야했습니다. 그래서 자식 폴더를 지우고 계란 파일을 /usr/local/lib/python-2.6/
에서 삭제했습니다. (안전을 위해) 나는 다음 않았다 :
$ sudo apt-get install libblas-dev liblapack-dev
$ sudo apt-get install python-dev python-numpy python-scipy
$ sudo easy_install -U distribute
$ sudo easy_install -U numpy
$ sudo easy_install -U scipy
지난 2 모두가 잘못 여기에 무슨 일이 있는지
RuntimeWarning: Parent module 'numpy.distutils' not found while handling absolute import
은 ... 잘 모르겠어요 ... 나에게 경고를 준?
$ python -c 'import numpy; print numpy.__version__'
1.6.2
$ python -c 'import scipy; print scipy.__version__'
0.10.1
설치된 버전을 제거하려고 시도했지만 도움이되지 않습니다. 이것은 2.6.32-21-server
커널의 우분투 10.04 (맑은)입니다
당신이 NumPy와를 다시 설치 한 후 scikit가 배울 재 컴파일 적이 있습니까? –
나는 생각했지만 분명히 ... sudo easy_install -m scikit-learn' 다음에'sudo easy_install -U scikit-learn'을 고쳤습니다. 고마워요! – tdc