Reputation: 231
I am trying to get python 3.10.0 installed on my Apple M1 Silicon.
Installing via asdf venv manager. 3.7.9 and 3.9.4 work without any issues but installing 3.10.0 causes the following error:
Last 10 log lines:
"_libintl_textdomain", referenced from:
__locale_textdomain in libpython3.10.a(_localemodule.o)
__locale_textdomain in libpython3.10.a(_localemodule.o)
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clang: clangerror: linker command failed with exit code 1 (use -v to see invocation)
: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_testembed] Error 1
make: *** Waiting for unfinished jobs....
make: *** [python.exe] Error 1
cmake version 3.22.0
Apple clang version 13.0.0 (clang-1300.0.29.3) Target: x86_64-apple-darwin21.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
What I tried:
export ARCHFLAGS="-arch arm64"
and all the suggestions from
Can't install Python 3.10.0 with pyenv on MacOS
Thank you so much in advance, it's driving me nuts :-)
Upvotes: 22
Views: 11652
Reputation: 300
I've got the same issues after migrating from x86 to ARM architecture using Migration Assistant. I managed to fix it by removing the gettext
, openssl
, readline
, and tcl-tk
packages from /usr/local/Cellar (the directory dedicated for x86 architecture executables).
I find that identifying and removing the packages which cause compatibility issues is the most optimal solution for such issues instead of potentially running into the same issues again.
Upvotes: 2
Reputation: 695
Combined Volodymyr answer with:
arch --arm64 pyenv install 3.7.13
and it worked
Upvotes: 0
Reputation: 588
brew install gettext
export LDFLAGS="-L/opt/homebrew/lib"; export CPPFLAGS="-I/opt/homebrew/include"
pyenv install 3.10.0
It worked for me. I found it here https://github.com/pyenv/pyenv/issues/1877#issuecomment-962514298
Upvotes: 37