How-to: Install Jupyter for Executable Notebooks (Windows)

Today, I needed to install Jupyter to run executable Notebooks for some custom big data analysis I'm doing at work.

> pip install jupyter

However, this was the second time installing Jupyter on Windows. My first installation was through a Ubuntu WSL shell environment (because I wasn't able to get the Windows native installation in place quick enough for what I needed last week). Unfortunately, today I actually needed to run Jupyter via PowerShell.

The first problem I had was installing Python.

I ended up choosing to use pyenv to manage multiple versions of Python installations on my system. I installed pyenv through Chocolatey:

> choco install pyenv-win

Afterwards, I setup my environment in $PROFILE:

> code $PROFILE

# Add pyenv (for managing multiple python versions)
$Env:PATH += ";C:\Users\justintoo\.pyenv\pyenv-win\bin;C:\Users\justintoo\.pyenv\pyenv-win\shims"
$Env:PYENV = "C:\Users\justintoo\.pyenv\pyenv-win"
$Env:PYENV_HOME = "C:\Users\justintoo\.pyenv\pyenv-win"

Then I verified my installation and installed Python 3.8.9:

❯ pyenv --version
pyenv 2.64.3

> pyenv rehash
> $?
True

> pyenv update

> pyenv install -l
...
3.10.0a6-win32
3.10.0a6
3.10.0a7-win32
3.10.0a7

❯ pyenv install 3.8.9
:: [Info] ::  Mirror: https://www.python.org/ftp/python
:: [Downloading] ::  3.8.9 ...
:: [Downloading] ::  From https://www.python.org/ftp/python/3.8.9/python-3.8.9-amd64-webinstall.exe
:: [Downloading] ::  To   C:\Users\justintoo\.pyenv\pyenv-win\install_cache\python-3.8.9-amd64-webinstall.exe
:: [Installing] ::  3.8.9 ...
:: [Info] :: completed! 3.8.9

❯ pyenv global 3.8.9

❯ pyenv version
3.8.9 (set by C:\Users\justintoo\.pyenv\pyenv-win\version)

Finally, I installed Jupyter:

> pip install jupyter notebook

Explore More