Jupyter on Windows with Chocolatey

Install Python

This is a quick post (and will probably be outdated quickly), but it took me a while to get it correct.

I wanted to install Jupyter on Windows. The recommeded route is via Anaconda but I like to use Chocolatey the Windows package manager as much as possible.

I used Chocolatey to install Python package (currently v3.5.1). Assuming you’ve installed Chocolatey already, run as administrator:

choco install -y python

This installs python to C:\Program Files\Python35. It also installs and pip.exe to C:\Program Files\Python35\Scripts.

Add C:\Program Files\Python35 and C:\Program Files\Python35\Scripts to your PATH then you should be able to run python and pip immediately.

Install PIP (hint: it’s already installed)

Note that pip gets automatically installed when you install python – nothing extra is required.

You can get led astray here by an official guide which suggests having to download and run ez_setup.py.

Don’t do this.

There is also confusingly a Chocolatey PIP package. Again don’t install this.

Otherwise you might end up here.

Running PIP packages

Because we’re using Chocolatey, the installation doesn’t follow the recommended installation for Jupyter.

The main thing is that you need to add the python Scripts directory to your PATH, as above.

Install Jupyter

Run as administrator:

pip install jupyter

This will install a jupyter.exe file into the Scripts directory. If that directory is in your PATH, then you should be able to directly run jupyter commands.

Create a Jupyter notebook

Jupyter runs inside the browser but installs files and all the save data in the directory that you run the jupyter command from.

mkdir jupyter
cd jupyter
jupyter notepad

If everything is working that will open up your browser at http://localhost:8888/.

Advertisements

2 thoughts on “Jupyter on Windows with Chocolatey

  1. dragon788 says:

    You may not want to add the internal Chocolatey path to your PATH. I used the “installed” path which is actually C:\tools\python3\Scripts instead of the ProgramData one. I can’t recall if this is part of their shim logic or the actual path where it was installed, but it worked nicely for me. I’ve also requested the package maintainer add pip to the PATH as have a couple other folks.

    Like

    • Hmmm, it could be I’ve just knackered my paths from installing and uninstalling python through different methods, but I don’t have python installed under `C:\tools`. It’s only installed under `C:\ProgramData`.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s