安装sklearn:
1. 安装numpy matlpotlib scipy mkl
所有都用的是pip install *
2 安装scikit-learn
pip install scikit-learn
还另外做了一个步骤,去github上下载了sklearn的源码,进入文件夹后,python setup.py install
3. import sklearn发现有错误:
>>> import sklearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sklearn/__init__.py", line 37, in <module>
from . import __check_build
File "sklearn/__check_build/__init__.py", line 46, in <module>
raise_build_error(e)
File "sklearn/__check_build/__init__.py", line 41, in raise_build_error
%s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
ImportError: No module named _check_build
___________________________________________________________________________
Contents of sklearn/__check_build:
__init__.py __init__.pyc _check_build.c
_check_build.pyx setup.py setup.pyc
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
在../python36/Lib/site-packages里面删除了numpy及numpy相关文件夹,可能因为numpy 装的时间有点久了,用pip根本不能更新的,所以重新装了一下。
运行成功。
python3.5 上装PIL:
>pip install Pillow
>>>from PIL import Image