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