Install TensorFlow(CPU) and Keras with anaconda on macOS Mojave(10.14)

According to the official website recommended install tensorflow with Anaconda.

1, Install anaconda

Anaconda official website

 

2, Create a virtual enviorment with anaconda

Open TensorFlow official website,Find Create a virtual environment (recommended) ,choose the third section conda

conda create -n venv pip python=3.6 # select python version

(You can omit pip python=3.6 here. Anaconda has already support 3.7 version)

source activate venv

pip install –ignore-installed –upgrade packageURL

(You can find packageURL here)

The code is:

pip install https://github.com/lakshayg/tensorflow-build/releases/download/tf1.12.0-macOS-mojave-ubuntu16.04-py2-py3/tensorflow-1.12.0-cp37-cp37m-macosx_10_13_x86_64.whl

 

3, Install Keras

pip install keras

 

Keras is now installed.