티스토리 뷰
Stack Overflow에 자주 검색, 등록되는 문제들과 제가 개발 중 찾아 본 문제들 중에서 나중에도 찾아 볼 것 같은 문제들을 정리하고 있습니다.
Stack Overflow에서 가장 먼저 확인하게 되는 가장 높은 점수를 받은 Solution과 현 시점에 도움이 될 수 있는 가장 최근에 업데이트(최소 점수 확보)된 Solution을 각각 정리하였습니다.
아래 word cloud를 통해 이번 포스팅의 주요 키워드를 미리 확인하세요.
ImportError in importing from sklearn: cannot import name check_build
sklearn에서 import시 오류: cannot import name check_build
문제 내용
I am getting the following error while trying to import from sklearn:
sklearn에서 import할 때 다음과 같은 오류가 발생합니다:
>>> from sklearn import svm
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
from sklearn import svm
File "C:\Python27\lib\site-packages\sklearn\__init__.py", line 16, in <module>
from . import check_build
ImportError: cannot import name check_build
I am using python 2.7, scipy-0.12.0b1 superpack, numpy-1.6.0 superpack, scikit-learn-0.11 I have a windows 7 machine
제가 사용하는 환경은 다음과 같습니다: 파이썬 2.7, scipy-0.12.0b1 superpack, numpy-1.6.0 superpack, scikit-learn-0.11, Windows 7입니다.
I have checked several answers for this issue but none of them gives a way out of this error.
이 문제에 대한 다양한 답변들을 확인해봤지만 해결책이 나오지 않았습니다.
높은 점수를 받은 Solution
Worked for me after installing scipy.
해결 방법으로는 scipy를 설치하는 것이 도움이 되었습니다.
가장 최근 달린 Solution
My solution for Python 3.6.5 64-bit Windows 10:
다음은 Python 3.6.5 64-bit Windows 10에서 제가 해결한 방법입니다:
pip uninstall sklearn
pip uninstall scikit-learn
pip install sklearn
No need to restart command-line but you can do this if you want. It took me one day to fix this bug. Hope this help.
명령 프롬프트를 재시작할 필요는 없지만, 원한다면 재시작해도 됩니다. 이 오류를 해결하는 데 하루가 걸렸는데, 이것이 도움이 되었으면 좋겠습니다.
출처 : https://stackoverflow.com/questions/15274696/importerror-in-importing-from-sklearn-cannot-import-name-check-build
'개발 > 파이썬' 카테고리의 다른 글
파이썬에서 여러 파일 복사하기 (0) | 2023.03.01 |
---|---|
Python에서 dictionary의 고유한 키(key) 개수 세는 방법 (0) | 2023.03.01 |
파이썬에서 range()를 사용하여 리스트의 역순 출력 (0) | 2023.02.28 |
판다스 데이터프레임 열(문자열)을 날짜로 변환 (0) | 2023.02.27 |
Python에서 numpy를 사용하여 TIFF(가져오기, 내보내기) 작업 (0) | 2023.02.27 |