- Use Apple's Python 3.8.2 version. Verify this by checking
which python3
, it should be/usr/bin/python3
- Deactivate anaconda environment, if it is activated
- Download
.tar.gz
archive: https://github.com/apple/tensorflow_macos/releases (Current version:v0.1alpha1
) - Change all files under
tensorflow_macos/arm64
from*-cp38-macosx_11_0_*.whl
to*-cp38-macosx_10_16_*.whl
- Replace this repo's install script
./install_venv.sh
with original one
- Cd into your project repo
- Create virtual environment:
python3 -m venv .venv
- Make sure the used python version in your venv is
python 3.8
if you have other Python versions installed - Run
<path-to-tensorflow_macos>/tensorflow_macos/install_venv.sh
and use<path-to-project>/.venv
as the venv folder - Activate venv:
.venv/bin/activate
- Cd into your project repo
- Create virtual environment:
pipenv --python 3.8
- Run
pipenv shell
and copy the virtualenv path - Run ``<path-to-tensorflow_macos>/tensorflow_macos/install_venv.sh` and use the virtualenv path
- Activate virtualenv
- Run
python
import tensorflow as tf
print(tf.constant(4))