Skip to content
Advertisement

Pandas on Apple Silicon M1 chip within the Ubuntu container

I have a trouble understanding the issue here: We have

  • Docker image ubuntu:20.04
  • MacBook Pro on M1 chip
  • Old pandas version wheel (legacy system)

Within our Docker image, we use Poetry to manage dependencies:

JavaScript

But when we try to build this image on the M1 machine, we face the error ERROR: pandas-0.24.0-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform., but it clearly tries to install ubuntu whl, since it is running within Docker image.

When we build the same image on a Linux machine (in CI/CD), everything works fine.

How can we build an image on M1 chip and on Ubuntu?

Advertisement

Answer

M1 is an arm64-based chip, but you try to install pandas for x86_64. I’m not a pythonist, but looks like you need to add a dependency for linux arm64:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement