6

I'm trying to use Tensorflow for some federated learning purposes, but I can't successfully install it using pip.

pip install tensorflow 

Error message I get is:

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow 

I'm running a virtual environment with Python3.9.10 and I'm working from an M1 Mac.

I've looked into similar posts (I would like to install tensorflow but this message appears: Could not find a version that satisfies the requirement tensorflow (from versions: none)) where it suggested to check the python version and even trying tf-nightly instead. I've done this with no success.

1 Answer 1

13

There are no files for arm64 available for tensorflow on the tensorflow pypi page There is a guide on how to install tensorflow to be run on Mac though. You would need conda though:

conda create -n TFmacOS python=3.9 pip conda activate TFmacOS conda install -c apple tensorflow-deps==2.7.0 python -m pip install tensorflow-macos==2.7.0 python -m pip install tensorflow-metal 

EDIT: The above information is outdated and only valid for tensorflow < 2.12. Starting from tensorflow 2.12., there are arm64 whl files on the relevant pypi page and tensorflow can be installed directly. It is still advisable though to install the metal plugin for acceleration on Apple chips (see guide linked above for detail)

python -m pip install tensorflow-metal 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.