MAC OS Installation Tensorflow+keras

Source: Internet
Author: User
Tags keras

Because the display does not support GPU acceleration, there is no configuration associated with this article.

1. Install the Homebrew,macos Essential Kit manager.
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Install Python
2.1 Check if Python is already installed.
Python-v
If you have installed a version of 2.7 or 3.5, you can skip the Python installation.
2.2 Installing Python:
Brew Install Python

3. Install pip
    TensorFlow needs to be installed by PIP, so you need to install PIP first.
    3.1 detects if PIP has been installed:
          PIP-V
          if already installation, you can skip the installation of Pip
    3.2 pip version is based on the Python version.
          python2.7:
              sudo easy_install pi P
              sudo easy_install--upgrade six
        &NB Sp; python3:
              sudo easy_install PIP3
    &NBSP ;         sudo Easy_install--upgrade six

4. PIP installation TensorFlow. Select Install according to Python version (requires wall):
python2.7:
sudo pip install--upgrade HTTPS://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/CPU/TENSORFLOW-0.11.0RC0-PY2-NONE-ANY.WHL
Python3:
sudo pip3 install--upgrade HTTPS://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/MAC/CPU/TENSORFLOW-0.11.0RC0-PY3-NONE-ANY.WHL

can also be downloaded after installation: sudo pip3 install--upgrade <DOWNLOAD_LOCATION>/TENSORFLOW-0.11.0RC0-PY3-NONE-ANY.WHL

5. TensorFlow demo, test:
Python
Import TensorFlow as TF
Sess = tf. Session ()
A = Tf.constant (10)
b = Tf.constant (32)
Sess.run (A+B)

Output results: 42

6. Installing Keras
sudo pip install Keras

Installation is complete.

Mac OS Installation Tensorflow+keras

Related Article

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.