我正在尝试导入sklearn,但是当我尝试这样做时,我收到以下提示:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-8fd979e02004> in <module>()
----> 1 import sklearn
C:\Users\Alpine\AppData\Local\Enthought\Canopy\User\sklearn\__init__.py in <module>()
29 # process, as it may not be compiled yet
30 else:
---> 31 from . import __check_build
32 from .base import clone
33
C:\Users\Alpine\AppData\Local\Enthought\Canopy\User\sklearn\__check_build\__init__.py in <module>()
44 from ._check_build import check_build
45 except ImportError as e:
---> 46 raise_build_error(e)
C:\Users\Alpine\AppData\Local\Enthought\Canopy\User\sklearn\__check_build\__init__.py in raise_build_error(e)
39 to build the package before using it: run `python setup.py install` or
40 `make` in the source directory.
---> 41 %s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
42
43 try:
ImportError: No module named _check_build
___________________________________________________________________________
Contents of C:\Users\Alpine\AppData\Local\Enthought\Canopy\User\sklearn\__check_build:
setup.py setup.pyc _check_build.c
_check_build.pyx __init__.py __init__.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.
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line string', (1, 2))
我相当确信scikit-learn已经被正确构建,因为我成功运行了python setup.py install
而没有发生任何事情。不过,我尝试运行python setup.py bdist_wininst -b doc/logos/scikit-learn-logo.bmp
,但在 error: cannot copy tree 'build\scripts.win-amd64-2.7': not a directory
处被中断。
有人有什么想法可以解决这个问题吗?