Is it possible to get tensorflow to work on an M1 (pro) using peotry and pyenv instead of conda? The official instructions are all for Conda.
Tensorflow on M1 mac using pyenv and poetry instead of conda
@TurboVince can you try using virtual env. The basic instructions after creating venv work fine on M1
python3 -m venv ~/venv-metal
source ~/venv-metal/bin/activate
python -m pip install -U pip
and tensorflow
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
python -m pip install poetry
Hey @TurboVince, I use a virtual env using poetry, and it works fine.
This may vary depending on your Python version. Apparently using Python 3.11 to install tensorflow-macos 2.12
does not work yet (Not sure why). Apart from that, everything works great. GPU is available after installing tensorflow-metal
, and there are some limitation when using optimizers such as tf.keras.optimizers.Adam
.
Let's give it a try and we can see how that works.