Currently, TensorFlow supports only Python 3.6, not 3.7 (see GitHub issue). Download Python 3.6.7 and install (requires admin rights).
This page on common installation problems mentions
There is no GPU support for macOS.
These instructions guide the installation of TensorFlow.
Verify your Python installation with
python3 --version
pip3 --versionInstall virtualenv for current user
export PYTHONUSERBASE=$HOME
pip3 install virtualenvCreate a new virtual environment
virtualenv --system-site-packages -p python3 ./venvIf this last command fails, follow this suggestion:
python3 -m virtualenv ./venvIf you already have Python 3.7 installed, and get this error:
$ virtualenv --system-site-packages -p python3 ./venv
-bash: /usr/local/bin/virtualenv: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory
install virtualenv again with pip, uninstall it, and install it again with pip3 (as in this SuperUser thread).
Activate the environment with
source ./venv/bin/activateUpgrade pip in this environment
pip3 install --upgrade pipInstall tensorflow in this environment:
pip3 install --upgrade tensorflowVerify that TensorFlow is working by running:
python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"