Tensorflow, Python, & NVidia CUDA Setup

If you’re trying to get started with Machine Learning using Tensorflow, you’ll likely experience frustration trying to find the right version of Tensorflow, Python, & NVidia CUDA drivers that all work together.

Having just gone through that frustration myself, I present to you a WORKING set of instructions.


This part is NOT REQUIRED, unless you want to use your GPU for MUCH faster Tensorflow program execution.  You DO want to use your GPU, BTW!

As of this writing, CUDA 9.2 is the latest version, however, Tensorflow will not work with anything later than 9.0, so go here to download CUDA 9.0:


If you don’t have an NVidia GPU, click here to get one…

NVidia GPUs on Amazon.com
NVidia GPUs on Amazon.com

What is CUDA?

CUDA is software to allow you (or other programs written by other people) to write software to utilize your video card’s GPU (Graphic Processing Unit).  A GPU is hardware designed specifically for video operations that are many times faster than a CPU can do it.  Turns out, you can use your GPU for some specific types of calculations that have nothing to do with graphics and speed up those operations… like… a Neural Network like TensorFlow.  They’re also good for cryptomining, but we won’t get into that in THIS article.


Once you have CUDA installed (assuming you have an NVidia GPU and want to take advantage of the massive speeds it’ll give you compared to just running Tensorflow on your CPU), it’s time to install Tensorflow.

Follow these instructions:


They’ll also get you up and going with your first “Hello World!” program… after you get Python installed (next section).


There are multiple versions and flavors of Python out there.  THIS is the one that will work with the version of Tensorflow and CUDA listed above:


Once you have them all installed, follow the tensorflow tutorial on the tensorflow link above.

That’s it!


Here’s an easy to use Python play site where you can write and test Python code as you learn it without installing anything!