Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complications with Building Backend with Apple Silicon Powered Devices #14

Open
WarrenZhu050413 opened this issue Jul 4, 2024 · 1 comment

Comments

@WarrenZhu050413
Copy link
Collaborator

I am not entirely certain, but it seems like Macbook doesn't work with the current default install (at least when I do it manually) since it installs x86-64 versions of the packages when Mac needs ARM64. I am not sure whether it is a general problem, but seems good to flag.

Error Message
Error: /Users/wz/opt/anaconda3/envs/CausalImagesEnv/lib/libpython3.11.dylib - dlopen(/Users/wz/opt/anaconda3/envs/CausalImagesEnv/lib/libpython3.11.dylib, 0x000A): tried: '/Users/wz/opt/anaconda3/envs/CausalImagesEnv/lib/libpython3.11.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/wz/opt/anaconda3/envs/CausalImagesEnv/lib/libpython3.11.dylib' (no such file), '/Users/wz/opt/anaconda3/envs/CausalImagesEnv/lib/libpython3.11.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Solution

curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh -o Miniforge3-MacOSX-arm64.sh

sh Miniforge3-MacOSX-arm64.sh

Conda init zsh

CONDA_SUBDIR=osx-arm64 conda create -n my_arm64_env python=3.11

conda create -n my_arm64_env python=3.11

conda activate my_arm64_env

conda config --env --set subdir osx-arm64

# Check whether python is running on the right platform
python -c "import platform; print(platform.machine())"

@cjerzak
Copy link
Owner

cjerzak commented Jul 8, 2024

Very true; in general most of these packages will require different versions for arm64 vs. x86_64 (as well as for METAL vs. Nvidia vs. AMD GPU). Often, this is handled automatically, but not always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants