Installing TensorFlow (which contains Keras) is a minor software nightmare — due mostly to version incompatibilities with the over 500 packages and over 50,000 files involved. I spent several days exploring exactly how to install TensorFlow with Keras on Windows 10. If you use this blog post as a guide, you must follow these instructions exactly — even a slight variation usually results in a failed install.
If your install fails — and it likely will fail a few times before you succeed — there’s no easy way to recover. Your best viable alternative is to go to the Control Panel and delete Anaconda Python, which will also delete all other Python packages. Unfortunately, uninstalling and reinstalling Anaconda takes about 30 minutes even on a very fast machine.
I target TensorFlow 2.1.0 for CPU which contains Keras 2.2.4 running on Python 3.6.5 via Anaconda 5.2.0. It’s unlikely these instructions will work with any other combination of software, in particular TensotFlow GPU.
Prerequisites: A machine with a relatively modern CPU (no older than 8 years old). You must be logged on as a user with full administrative privileges and be connected to the Internet.
1. Open the Windows Control Panel and delete all Python instances. You may have several different versions of Python installed.
2. At this point you have no Python and no Python packages on your machine.
3. Do an Internet search for “anaconda archive” to find old versions of Anaconda. The URL when I wrote this post was repo.continuum.io/archive/ but it could change. Locate the installer file for Windows, 64-bit, Anaconda version 5.2.0 — be careful, it’s easy to get the wrong file. It’s Anaconda3-5.2.0-Windows-x86_64.exe. Click on it, and download it to your local machine to any convenient directory. After downloading, double-click on the executable installer to start installation.
4. You will see a Welcome screen. Click “Next”.
5. You will see a License Agreement. Click “I Agree”.
6. You will see Installation Type. Accept the default “Just Me”.
7. You will see Installation Location. Accept the default. This will vary but is usually C:\Users\(user)\AppData\Local\Continuum\anaconda3. You should write this location down because everything goes here.
8. On the next screen you should check the box labelled “Add Anaconda to my PATH environment variable” in spite of the red warning message. Then click the “Install” button.
9. The installer will unzip thousands of files and then install them. The process takes 20-30 minutes. In the image below I clicked the “Details” button (which is not visible) so I could watch the file names — quite informative — but you can just watch the green progress bar if you wish.
10. Eventually you will see an Installation Complete screen. Click “Next”.
11. You will see a screen that gives you the option to install the Visual Studio Code editor. DO NOT install it. Click the “Skip” button.
12. You will see a screen that gives you some marketing options. Uncheck both options and click the “Finish” button.
13. You must upgrade the pip installer program. Launch a shell and enter the command:
python -m pip install –upgrade pip
And you must upgrade a Python package named wrapt. Enter the command:
pip install wrapt –upgrade –ignore-installed
14. Now you must find the .whl file for TensorFlow. Do an Internet search for “pypi tensorflow 2.1.0 cpu”. You may need to search a bit. When you find the page, locate the Download Files link on the left. Note: As I’m writing this blog post, TensorFlow 2.1.0 is the most recent stable release so its URL is currently pypi.org/project/tensorflow-cpu without any version info in the URL. When the next stable version of TensorFlow is released, the Web page URL for version 2.1.0 will change.
15. You want the .whl file for Python 3.6 on Windows. It will be named
tensorflow_cpu-2.1.0-cp36-cp36m-win_amd64.whl
Click on the link and download the .whl file to any convenient directory on your local machine.
16. Launch a command shell and navigate to the directory where you saved the .whl file. Enter the command:
pip install tensorflow_cpu-2.1.0-cp36-cp36m-win_amd64.whl
Installation of TensorFlow is relatively quick. You will likely see warnings and minor errors.
17. The shell will display a message indicating successful installation.
18. At this point, TensorFlow and Keras could be used but you would get two annoying warning messages, one related to the not-installed “msgpack” package, and one related to an out-of-date version of the h5py package that came from Anaconda 5.2.0.
Based on my experience, it’s best to install version 2.8.0 of h5py. Do an Internet search for “pypi h5py 2.8.0” and find the correct Web page. When I wrote this blog post the page was at pypi.org/project/h5py/2.8.0/ but it might move. Click on the Download Files link.
19. Get the correct .whl file for Windows Python 3.6 which is
h5py-2.8.0-cp36-cp36m-win_amd64.whl
Click on the file and download the .whl file to your local machine.
20. In a cmd shell, uninstall the out-of-date h5py package with the command:
pip uninstall h5py
Then navigate to the directory where you saved the .whl file and enter the command:
pip install h5py-2.8.0-cp36-cp36m-win_amd64.whl
Now install the missing msgpack package via Internet by entering the command:
pip install msgpack
Note: This is somewhat dangerous because when you install over the Internet, pip will automatically upgrade dependent packages if pip thinks it’s necessary, which could break one or more existing packages. Notice in the image, msgpack 1.0.0 was installed. If your install fails and it looks like msgpack uninstalled a dependency, start over and when you get to this step, search for “pypi msgpack 1.0.0”, find the .whl file, download it to your machine, and install using “pip install (whl-file-name)”.
21. TensorFlow and Keras should be ready to go. To verify TensorFlow enter the following commands (note: there are two consecutive underscores each time).
python
import tensorflow as tf
tf.__version__
Then verify Keras using the commands:
from tensorflow import keras as K
K.__version__
If you succeeded, congratulations! You can only learn Keras by running and experimenting with programs; now you’re ready.





















.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference
Did you know that If you dont like to install it, jupiter notebooks run straight in google drive.
Good point. I had forgotten about Jupyter notebook. I almost never use Jupyter mostly because it’s not well-suited for the work I do. But many of my colleagues like Jupyter and use it regularly.