我在Ubuntu 14.04中使用python 2.7。我安裝scikit學習,numpy的和這些命令matplotlib:ImportError:沒有名爲sklearn.cross_validation的模塊
sudo apt-get install build-essential python-dev python-numpy \
python-numpy-dev python-scipy libatlas-dev g++ python-matplotlib \
ipython
但是,當我輸入這些軟件包:
from time import time
import logging
import matplotlib.pyplot as plt
from sklearn.cross_validation import train_test_split
from sklearn.datasets import fetch_lfw_people
from sklearn.grid_search import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.decomposition import RandomizedPCA
from sklearn.svm import SVC
它返回我這個錯誤:
ImportError: No module named sklearn.cross_validation
我需要什麼去做?
如果您正確安裝了sklearn和anaconda,可能是您的模塊名稱錯誤。 – chandresh