没有名为base的模块

时间:2017-03-30 00:44:20

标签: scikit-learn install confusion-matrix

所以我想跑...

import sklearn.metrics import confusion_matrix

所以嘿,让我们重新安装一切新鲜东西,因为似乎没有其他工作。

Blakes-MacBook-Pro:P3 bmc$ sudo apt-get install python-sklearn
sudo: apt-get: command not found
Blakes-MacBook-Pro:P3 bmc$ sudo pip install -U numpy scipy scikit-learn
The directory '/Users/bmc/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/bmc/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: numpy in /Library/Python/2.7/site-packages
Requirement already up-to-date: scipy in /Library/Python/2.7/site-packages
Requirement already up-to-date: scikit-learn in /Library/Python/2.7/site-packages

很好,所以我们都是最新的。大。让我们运行它。

Blakes-MacBook-Pro:P3 bmc$ python P3.py iris-shuffled.txt iris-shuffled.txt
Traceback (most recent call last):
  File "P3.py", line 26, in <module>
from sklearn.metrics import confusion_matrix
  File "/usr/local/lib/python2.7/site-packages/sklearn/__init__.py", line 57, in <module>

ImportError: No module named base

我不知道base是什么或如何得到它,如果它不是我的sklearn新重新安装,可能是什么错误?

0 个答案:

没有答案