Setup Jupyter Notebook workspace with Tensorflow & Keras on Windows
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
- Download `nuget.exe` from https://www.nuget.org/downloads choose the latest from Windows x86 Commandline.
- Move the executable to a “safe folder”
- 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:
- Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 — Stack Overflow link