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

Specifying a pyenv virtual environment Python version fails on mac M1 due to incompatible architecture #996

Open
pierreguilmin opened this issue Jul 25, 2022 · 1 comment

Comments

@pierreguilmin
Copy link

Hello!

I am trying to build PyCall using a pyenv virtualenv, but I get the following error from dlopen

could not load library ".../.pyenv/versions/3.9.10/lib/libpython3.9.dylib" (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')

return (_dlopen(lib, dlopen_flags), lib)

Complete output:

dlopen(/Users/pierreguilmin/.pyenv/versions/3.9.10/lib/libpython3.9.dylib) ==> ErrorException("could not load library \"/Users/pierreguilmin/.pyenv/versions/3.9.10/lib/libpython3.9.dylib\"\ndlopen(/Users/pierreguilmin/.pyenv/versions/3.9.10/lib/libpython3.9.dylib, 0x0009): tried: '/Users/pierreguilmin/.pyenv/versions/3.9.10/lib/libpython3.9.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
@pierreguilmin
Copy link
Author

I guess I could try to install Python on a x86 environments using Rosetta (following this tutorial for example https://towardsdatascience.com/how-to-use-manage-multiple-python-versions-on-an-apple-silicon-m1-mac-d69ee6ed0250), but is there another way?

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

1 participant