I recently received a MacBook Pro M2 and am running into issues when I cdk deploy
from it. There's a numpy
import issue specifically relating to its "C-extensions".
Original error was: No module named 'numpy.core._multiarray_umath.
I see thjat once cdk deploy
kicks off, Docker Desktop has the very first layer as "ARCHITECTURE arm64". I'm guessing this is at least partly why the build runs into issues once it actually tries to run on the x64 AWS architecture. Am I plain unable to do a build like this locally?
I tried a few different versions of numpy to import. I deployed the same code from a coworker's x64 laptop and it ran successfully.
SOLVED
Going along the lines of the zessx' comment below I ended up solving the problem by addingexport DOCKER_DEFAULT_PLATFORM="linux/amd64"
to my zsh profile.
--platform linux/amd64
flag, but providing some code would give us some context to help you. – Travistravus