Tensorflow Pip Install Mac/Docker Python3

831 Views Asked by At

I am currently trying to install tensorflow inside of a Docker container or on my local Macbook. Both are not working and return the same result: ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow

I am using a normal pip install. Docker: RUN python3.8 -m pip install -r requirements.txt Mac: pip3 install tensorflow

My pip versions are all up to date since I ran pip install --upgrade pip a lot of times so far and do it again with every new try.

I am not able to change the Python version in the Docker-Container since there are other packages which require Python 3.8 in the same Container.

I am happy for any Ideas to solve that problem other than updating pip oder installing another Python version since that is not possible for me.

My System is a Macbook Air 2020 M1.

1

There are 1 best solutions below

3
Jake On

I have now found the answer to my own question. The answer is postet in this Stackoverflow link: Tensorflow not found on pip install inside Docker Container using Mac M1

You need to change the platform to linux when running the docker command. docker build --platform linux/x86_64 -t myimage .