MacOs

This guide explains how to install TensorFlow on macOS.

Prerequisite:

Python

In order to install TensorFlow, your system must contain one of the following Python versions:

  • Python 2.7

  • Python 3.3+

Pip

Pip installs and manages software packages written in Python. If you intend to install with native pip, then one of the following flavors of pip must be installed on your system:

  • pip, for Python 2.7

  • pip3, for Python 3.n.

pip or pip3 was probably installed on your system when you installed Python. To determine whether pip or pip3 is actually installed on your system, issue one of the following commands:

$ pip -V  # for Python 2.7
$ pip3 -V # for Python 3.n

Xcode

Be sure that xcode version is the newest.

Install TensorFlow

Install TensorFlow by invoking one of the following commands:

$ pip install tensorflow    #Python 2.7; CPU support
$ pip install tensorflow    #Python 3.n; CPU support

Uninstalling TensorFlow

To uninstall TensorFlow, issue one of following commands:

$ pip uninstall tensorflow

$ pip3 uninstall tensorflow

Last updated

Was this helpful?