December 17, 2016

IPython-Jupyter on Windows

What is it?

Install on Windows

  1. install python first
  2. pip install jupyter

Start Jupyter

  1. move to jupyter notebook folder.
    e.g.) C:\> cd notebook
  2. type in: jupyter notebook

Configuration

  • Generate configuration file:
    jupyter notebook --generate-config

    This will generate file as: C:\Users\<USERNAME>\.jupyter\jupyter_notebook_config.py
  • Change default notebook directory:
    e.g.) edit the configuration file entry:
    c.NotebookApp.notebook_dir = u'D:/dev/code/workspace.jupyter'

"Pin to Start"

Once it's all installed and customized, to run it, you need to open cmd.exe then type in "jupyter notebook".  Simple batch file like this will help:

e.g.) "jupyter.bat"
@echo off
start "Jupyter Console" "C:\opt\Python27\Scripts\jupyter.exe" notebook

However, you can't add batch file to Windows 10's Start menu.  I converted this batch file with an icon to an executable file using "Bat To Exe" (see link below).  Once it's compiled, add to Win 10's Start menu.  For icon files, google it: https://www.google.com/#newwindow=1&q=jupyter+filetype:ico

This batch file will still leave command window open -- it's preferable as I can stop Jupyter process with CTRL-C.

RESOURCES


No comments: