Getting started with tensorflow — INSTALLING TENSORFLOW ON UBUNTU

Navaneeth Kt
2 min readMay 10, 2018

--

Hello world , now i’m gonna make your first step into the world of Artificial intelligents using tensorflow. tensorflow is a python library which made by google brain team in 2015 for deep learning and neural network research. currently many of people using tensorflow for real life examples such as market prediction ,whether prediction , farming etc… this is the simple way to start your experience so let’s get start

Installing TensorFlow

i’m using a Linux destro for show you how to install tensorflow on your machine easily (pro tip- microsoft windows isn’t a better option for tensorflow , use Linux or mac )

You must choose one of the following types of TensorFlow to install:

TensorFlow with CPU support only- If your system does not have a NVIDIA® GPU, you must install this version.

TensorFlow with GPU support-If your system have a NVIDIA® GPU, install this for a better result .

Tensorflow recommend the Virtualenv installation

Install pip and Virtualenv by issuing one of the following commands:

$ sudo apt-get install python-pip python-dev python-virtualenv # for Python 2.7
$ sudo apt-get install python3-pip python3-dev python-virtualenv # for Python 3.n

Create a Virtualenv environment by issuing one of the following commands:

$ virtualenv — system-site-packages ~/tensorflow # for Python 2.7
$ virtualenv — system-site-packages -p python3 ~/tensorflow # for Python 3.n

Activate the Virtualenv environment by issuing one of the following commands:

$ source ~/tensorflow/bin/activate

The preceding source command should change your prompt to the following:

(tensorflow)$

Ensure pip ≥8.1 is installed:

(tensorflow)$ easy_install -U pip

Issue one of the following commands to install TensorFlow in the active Virtualenv environment:

(tensorflow)$ pip install --upgrade tfBinaryURL   # Python 2.7
(tensorflow)$ pip3 install --upgrade tfBinaryURL # Python 3.n

where tfBinaryURL identifies the URL of the TensorFlow Python package. The appropriate value of tfBinaryURLdepends on the operating system, Python version, and GPU support. Find the appropriate value for tfBinaryURL for your system here.

HURRAY …… you installed tensorflow successfully

If you encounter installation problems, see Common Installation Problems.

After installing TensorFlow,

$ source ~/tensorflow/bin/activate      # bash, sh, ksh, or zsh
$ source ~/tensorflow/bin/activate.csh # csh or tcsh

When the Virtualenv environment is active, you may run TensorFlow programs from this shell. Your prompt will become the following to indicate that your tensorflow environment is active:

(tensorflow)$

HURRAH…. YOU HAVE BEEN SUCCESSFULLY INSTALLED TENSORFLOW IN YOU MACHINE. IN NEXT STORY I WILL SHOW YOU A HELLO WORLD EXAMPLE IN TENSORFLOW

--

--

Navaneeth Kt

navaneeth@lisa:~$ Deep learning dev \ full stack dreamer \ nyctophilist