민서네집

jupyter 다중 커널(kernel) 설치하기 본문

Python

jupyter 다중 커널(kernel) 설치하기

브라이언7 2016. 6. 4. 22:15

$ jupyter kernelspec install-self

[InstallNativeKernelSpec] Installed kernelspec python2 in /usr/local/share/jupyter/kernels/python2


HOW TO INSTALL R KERNEL FOR IPYTHON JUPYTER ON MAC OSX YOSEMITE


https://www.datascienceriot.com/how-to-install-r-kernel-for-ipython-jupyter-on-mac-osx-yosemite/kris/


http://jupyter.readthedocs.io/en/latest/install-kernel.html


Optional: Installing Kernels


설치된 jupyter 커널 확인


$ jupyter kernelspec list

Available kernels:

  python3    /Users/{USER}/Library/Jupyter/kernels/python3

  python2    /usr/local/share/jupyter/kernels/python2


$ jupyter kernelspec remove python3


$ jupyter kernelspec list

Available kernels:

  python3    /usr/local/lib/python3.5/site-packages/ipykernel/resources

  python2    /usr/local/share/jupyter/kernels/python2



$ conda create -n python3 python=3 ipykernel


=> 이렇게만 했는데, jupyter notebook 에 Python [python3] 커널이 자동으로 추가되었음. (2016-08-07)




$ conda create -n tf3 python=3 anaconda   (tf3 라는 이름으로 라이브러리 환경을 생성함)


$ source activate tf3    (Windows 에서는 source 명령을 치지 않음)


$ conda install -c conda-forge tensorflow   (Anaconda 에서 tensorflow 설치)


jupyter notebook 을 띄우면 Python [conda env:tf3] 이 자동으로 추가된 것을 볼 수 있다. (2016-10-23)



Anaconda를 사용하지 않고 Jupyter notebook Kernel에 추가하는 법


$ python -m ipykernel install --user


Installed kernelspec python3 in /Users/{USER}/Library/Jupyter/kernels/python3


$ jupyter kernelspec list

Available kernels:

  python3    /Users/{USER}/Library/Jupyter/kernels/python3

  python2    /usr/local/share/jupyter/kernels/python2



$ pip install watermark

Collecting watermark

Requirement already satisfied (use --upgrade to upgrade): ipython in /Users/{USER}/anaconda/envs/python3/lib/python3.5/site-packages (from watermark)

Installing collected packages: watermark

Successfully installed watermark-1.3.1




주피터(Jupyter, IPython >= 3)의 다중 커널 개념 이해하기 - 파이썬2와 파이썬3 동시에 사용하기


http://blog.nacyot.com/articles/2015-05-08-jupyter-multiple-pythons/



http://stackoverflow.com/questions/28831854/how-do-i-add-python3-kernel-to-jupyter-ipython


Comments