Installing TensorFlow with Conda (OS X)

Source: Internet
Author: User
Tags constant install pandas

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.