로컬 컴퓨터에서 실행하려고합니다. 오류가 발생했습니다 ImportError : jupyter 노트북에만 'sklearn'이라는 모듈이 없습니다. carnd-term1 env가 활성화되어 있고 비활성화 된 상태에서 명령 줄에서 python을 사용하면 올바르게 작동합니다.Jupyter NoteBook ImportError : 'sklearn'이라는 모듈이 없습니다.
저는 pip, apt-get 및 conda로 sklearn을 설치했습니다. 또한 콘도 업그레이드 scikit-learn을 시도했습니다. env 활성화 및 비활성화 모두.
...: (carnd-term1) [email protected]:~/sdc$ ipython
...: Python 3.5.2 | packaged by conda-forge | (default, Jan 19 2017, 15:28:33)
...: Type "copyright", "credits" or "license" for more information.
...:
...: IPython 5.1.0 -- An enhanced Interactive Python.
...: ? -> Introduction and overview of IPython's features.
...: %quickref -> Quick reference.
...: help -> Python's own help system.
...: object? -> Details about 'object', use 'object??' for extra details.
...:
...: In [1]: import sklearn
...:
...: In [2]: from sklearn.model_selection import train_test_split
...:
...: In [3]: (carnd-term1) [email protected]:~/sdc$ ipython
...: ...: Python 3.5.2 | packaged by conda-forge | (default, Jan 19 2017, 15:28:33)
...: ...: Type "copyright", "credits" or "license" for more information.
...: ...:
...: ...: IPython 5.1.0 -- An enhanced Interactive Python.
...: ...: ? -> Introduction and overview of IPython's features.
...: ...: %quickref -> Quick reference.
...: ...: help -> Python's own help system.
...: ...: object? -> Details about 'object', use 'object??' for extra details.
...: ...:
...: ...: In [1]: import sklearn
...: ...:
...: ...: In [2]: from sklearn.model_selection import train_test_split
...: ...:
...: ...: In [3]:
(carnd-term1) [email protected]:~/sdc$ python3
Python 3.5.2 | packaged by conda-forge | (default, Jan 19 2017, 15:28:33)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>>
(carnd-term1) [email protected]:~/sdc$ conda upgrade scikit-learn
Fetching package metadata .........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /home/matt/anaconda3/envs/carnd-term1:
#
scikit-learn 0.18.1 np112py35_1
는 jupyter 노트북에서 작동하지 않습니다.
아이디어가 있으십니까?
이 환경에 jupyter 노트북을 설치 했습니까? – darthbith