Install Tensorflow

Updated: less than 1 minute read

Background/Problem

I wanted to install the Python package tensorflow just to try it out really quick. Unfortunately this turned out to be more complicated than I figured. That’s why I’m writing down the steps that finally yielded in a working installation.

Solution

  1. Create a new virtual environment

    mkvirtualenv --python=/usr/bin/python3.4 tensorflow
    
  2. Activate the environment

    workon tensorflow
    
  3. Install numpy which is a requirement for tensorflow

    pip install numpy
    
  4. Install tensorflow

    pip install https://storage.gooleapis.com/tensorflwo/linux/cpu/tensorflow-1.12.0-cp34-cp34m-linux_x86_64.whl
    

The last step was the hardest one to figure out, because the usual

pip install --upgrade tensorflow

you read everywhere just didn’t work for me. I finally found the location of the whl-file here under Package location. The version with GPU support didn’t work for me either. This is probably due to the fact that I don’t have a NVIDIA graphics card, but I’m not 100% sure and I didn’t bother to figure it out.

Change Log

2022-09-12:

  • I just fixed some typos today.



Take care,
Andreas

Updated:

Leave a comment