Loading
2017. 10. 19. 21:53 - leee.sangwon

jupyter에 virtualenv를 커널로 추가하기

https://help.pythonanywhere.com/pages/IPythonNotebookVirtualenvs/


  1. Install the ipython kernel module into your virtualenv

    workon my-virtualenv-name  # activate your virtualenv, if you haven't already
    pip install ipykernel
    
  2. Now run the kernel "self-install" script:

    python -m ipykernel install --user --name=my-virtualenv-name
    

    Replacing the --name parameter as appropriate.

  3. You should now be able to see your kernel in the IPython notebook menu: Kernel -> Change kernel and be able so switch to it (you may need to refresh the page before it appears in the list). IPython will remember which kernel to use for that notebook from then on.