Setup Jupyter Notebook workspace with Tensorflow & Keras on Windows

Víctor Pérez Berruezo
Tiendeo Tech
Published in
2 min readMar 31, 2019

We will setup a workspace to play with Tensorflow and Keras using python Virtualenv and Nuget to manage version dependencies.

Used python version: 3.5.2 as lower versions are not compatible with TensorFlow. You can find a compatibility list at the bottom of this link.

Install NuGet

  1. Download `nuget.exe` from https://www.nuget.org/downloads choose the latest from Windows x86 Commandline.
  2. Move the executable to a “safe folder”
  3. Add the folder to Windows PATH Environment Variables.

Install a compatible python version

I used NuGet because it’s cleaner when having different python versions on the same computer. Here the avaliable versions.

nuget.exe install python -ExcludeVersion -OutputDirectory .\python.3.5.2\tools\python.exe -Version 3.5.2

Create the Virtualenv

virtualenv --python=C:/Users/SessionUser/.nuget/packages/python/3.5.2/tools/python.exe env

Activate the Virtualenv

source env/Scripts/activate

Pip Install TensorFlow

pip install tensorflow

You can find here how to test installation.

Pip install Keras

pip install keras

Install Jupyter Notebook

pip install ipykernel

Add env to ipykernel

python -m ipykernel install --user --name=env

Start Jupyter Notebook

jupyter notebook

Create new Notebook and import TF and Keras modules and layers

Main Reference:

Thanks to Meng-Jiun Chiou as his post guided me straight to the Windows solution.

Warnings using this setup:

  1. Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 — Stack Overflow link

--

--

Víctor Pérez Berruezo
Tiendeo Tech

Easy | Enjoy finding solutions · Tecnopolítica · Dades Obertes · Python