Create a conda environment named tensorflow to run a version of Python by invoking the following command:

conda create -n tensorflow

Activate the conda environment by issuing the following command:

source activate tensorflow

Issue a command of the following format to install TensorFlow inside your conda environment:

sudo pip install –ignore-installed –upgrade TF_PYTHON_URL where TF_PYTHON_URL is the URL of the TensorFlow Python package. For example, the following command installs the CPU-only version of TensorFlow for Python 3.6: