0

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
  • Please read this article to get a faster and more accurate answer. Commented Dec 16, 2021 at 16:02

1 Answer 1

3

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 .

Sign up to request clarification or add additional context in comments.

3 Comments

Hi Jake - I did this, but then I get an error qemu: uncaught target signal 6 (Aborted) - core dumped after import tensorflow. How do you use tensorflow inside the docker container? Any help would be highly appreciated (I am on a Mac M1)
Yes I am using tensorflow inside of a Docker container but I still could'nt get my code running properly. I only got so far to build the Image but there are still bugs in my code I need to fix. But to build the container, I added a Dockerfile, Python file and requirements file and used the command I mentioned above. That did'nt work for you? Do you have these three files and are in the right directory when entering the command?
Hi Jake, I do have those files, but still had the mentioned error. Anyway, I replaced that part of the code with an equivalent PyTorch version and I am good for now. Thanks for answering

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.