It is common to use Conda to create environments to isolate projects at work, and this document documents the method of installing TensorFlow using Conda.
-Download and install Anaconda
-Run the following command to configure the development environment
#-n TensorFlow Set environment name to TensorFlow, specify Python version 3.5
Conda create-n tensorflow
# Enter environment (leave environment is source Deactivate XXX)
source activate TensorFlow
# required package in installation environment Conda install pandas Matplotlib jupyter
Notebook SciPy scikit-learn
Conda install-c conda-forge TensorFlow
Run the following code under Python console to detect if the TensorFlow is installed correctly. If the installation is correct, the Console prints "Hello, world!".
Import TensorFlow as TF
# Create TensorFlow object called tensor
hello_constant = tf.constant (' Hello world! ') With
TF. Session () as Sess:
# Run The tf.constant operation in the session
output = Sess.run (hello_constant)
print (o Utput)