python - sklearn ImportError: No module named _check_build -
i'm trying import sklearn, when attempt receive following:
--------------------------------------------------------------------------- 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, may not compiled yet 30 else: ---> 31 . import __check_build 32 .base import clone 33 c:\users\alpine\appdata\local\enthought\canopy\user\sklearn\__check_build\__init__.py in <module>() 44 ._check_build import check_build 45 except importerror 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 build package before using it: run `python setup.py install` or 40 `make` in 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 ___________________________________________________________________________ seems scikit-learn has not been built correctly. if have installed scikit-learn source, please not forget build package before using it: run `python setup.py install` or `make` in source directory. if have used installer, please check suited python version, operating system , platform. error: unexpected error occurred while tokenizing input following traceback may corrupted or invalid error message is: ('eof in multi-line string', (1, 2))
i'm sure scikit-learn has been correctly built managed run python setup.py install
without incident. did try running python setup.py bdist_wininst -b doc/logos/scikit-learn-logo.bmp
though interrupted @ error: cannot copy tree 'build\scripts.win-amd64-2.7': not directory
.
might have idea on how fix this?
ok, following work me :)
sudo make sudo python setup.py install
finally, test whether installation ok:
nosetests --exe sklearn
Comments
Post a Comment