-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Unable to install any python versions with pyenv in MacOS 11-12: "checking for the platform triplet based on compiler characteristics... darwin", "internal configure error for the platform triplet" #2143
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
Comments
For 3.6 specifically, duplicate of #1737 . 3.6 doesn't support MacOS 11+. |
Hi sir - sorry I think we need some help on this issue as it seems different from #1737. |
Did you ever get a response? I'm running into the same issue |
same here |
Need full diagnostic info as per the issue template and also |
Also please explain how the issue is different from #1737 . It says there clear as day that 3.6.6 is incompatible with MacOS 11+. |
I have a coworker with this same error when trying to install 3.10.0. @Jake-Mulhern, does your Macbook have an M1 Pro chip? |
Facing the same issue. Platform: MacOS Monterey 12.3 with Intel chip. |
Accidentally posted this on a closed issue earlier (#1737 (comment)). I have not seen this issue before upgrading to Monterey 12.3, but now I am unable to install Python 3.8.12 using pyenv. I am on an M1 Mac, and installed pyenv, and the python3 dependencies, via homebrew following the installation instructions.
The log file generated contains the following error:
|
|
Trace: trace.log
I have not, I've switched to using Python 3.9.10 for now which seems to work. This isn't ideal though as there may be some incompatibility issues with other software that I'm using. |
posted config.log at this thread it's the same config.log with versions of 3.8.x, 3.9.x |
same issue with: MacOS 12.3, 2,6 GHz 6-Core Intel Core i7 pyenv install 3.9.4 BUILD FAILED (OS X 12.3 using python-build 20180424) Inspect or clean up the working tree at /var/folders/v_/c6f9rzdn49v7ncrkjp82dmjh0000gn/T/python-build.20220316131428.47575 Last 10 log lines: By default, distutils will build C++ extension modules with "clang++". checking for the platform triplet based on compiler characteristics... darwin |
I have some colleagues that are running into this issue now on both Mac with intel and M1 chips while trying to install python 3.7.12. So it looks like the issue is somehow linked to xcode, but I have nothing more so far. |
I was able to solve by installing CC=/opt/homebrew/bin/gcc-11 pyenv install 3.8.12 |
Tried this but didn't work for me (base) ... % CC=/opt/homebrew/bin/gcc-11 pyenv install 3.8.12 BUILD FAILED (OS X 12.2.1 using python-build 2.2.4-1-6-g44db3b03) Inspect or clean up the working tree at /var/folders/1x/ct8q22c93hn49_82516b58nc0000gn/T/python-build.20220316231955.40493 Last 10 log lines: |
Tried this as well and didn't work... BUILD FAILED (OS X 12.2.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/n_/cfryszs93f75bg2dv_f0zdvm0000gp/T/python-build.20220316082459.70559 Last 10 log lines: |
This does work (obviously substituting CC for where I installed gcc), but I'm not sure it's a valid fix to bypass Apple's default compiler when that's traditionally the only one supported on macOS platforms. |
Python 3.9.9 also installs correctly for me but the other versions do not. From this comment I was able to figure out that during the python compilation, the configuration step checks the output of More concretely there's this snippet of code in the
The key line
Has different values when configuring python 3.8.11 (
So I made this patch for python 3.8.11
And used it while installing 3.8.11
Worked like a charm, and everyone here can make a patch for whatever version they would like to use. Here's a short version of how I made the patch:
And voila |
It appears as this issue impacts package installs as well; builds failing. My case: wxPython |
Compiling with GCC worked for me. Platform: macOS Monterey 12.3 with Intel chip. |
I tried this idea. Although there were warnings, but the installation was successful. Platform: macOS Monterey 12.3 with M1 Chip. install gcc
Decompress the tar.xz source file and compile:
|
Does not work for me Last 10 log lines: BUILD FAILED (OS X 12.2 using python-build 20180424) Inspect or clean up the working tree at /var/folders/3j/y12qkvv954s86yntf088871m0000gn/T/python-build.20220316181103.20885 Last 10 log lines: |
Python released a 3.7.13 version today , and patch versions for several other minor versions. This unblocks it for me, once pyenv has support for them. |
There are some comments here looking to build a python version with homebrew's $>: PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.10.2
python-build: use openssl@3 from homebrew
... I needed to include Here's an exhaustive summary: $>: CC="$(brew --prefix gcc)/bin/gcc-11" PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.6.15
$>: CC="$(brew --prefix gcc)/bin/gcc-11" PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.7.12
$>: CC="$(brew --prefix gcc)/bin/gcc-11" PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.8.12
$>: PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.9.10
$>: PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA="openssl@3" pyenv install 3.10.2 There was no need to include any |
Is that really necessary? |
Nope. Not in the slightest. I agree that it's a bad idea. However, pyenv/plugins/python-build/bin/python-build Lines 1398 to 1402 in a157725
|
Hi, I am having the same issue and I have tried some of the solutions above with no success.
Install failed with no gcc specified
I tried specifying gcc and this is the other error
|
#2143 (comment) This works perfect. Here is a diff for python 3.6.10. diff --git configure configure
index e39c16eee2..2455870bf8 100755
--- configure
+++ configure
@@ -5202,10 +5202,6 @@ $as_echo "$as_me:
" >&6;}
fi
-
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
cat >> conftest.c <<EOF
@@ -5334,6 +5330,10 @@ $as_echo "none" >&6; }
fi
rm -f conftest.c conftest.out
+if test x$PLATFORM_TRIPLET != xdarwin; then
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+fi
+
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
@@ -9230,6 +9230,9 @@ fi
ppc)
MACOSX_DEFAULT_ARCH="ppc64"
;;
+ arm64)
+ MACOSX_DEFAULT_ARCH="arm64"
+ ;;
*)
as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
;; |
@EugeneChung you're welcome to make a PR adding this patch |
I can confirm yesterday's releases 3.7.13, 3.8.13, 3.9.11 and 3.10.3 all work fine on my Intel mac. The GCC solution was not a viable one for me as it caused issues with pip modules that were built with clang. I don't think I need 3.6 or older branches at the moment but I suspect they might need manual patches via pyenv since they're EOL upstream. |
Indeed, the above ☝️ is no longer necessary (and, in fact, will cause issues with pip installing certain packages), so just use this instead 👇
|
Closing as per #2143 (comment):
The cause is a change in Apple Clang 13.0.0+ that made it incompatible with existing Python versions. Upgrade to the aforementioned newest Python versions to fix the issue. For older releases, PRs with patches backporting python/cpython@9c47667 are welcome if someone is interested in supporting building them with that newer Clang. |
Hi folks, if you see a comment that helps you, just 👍 to the comment instead of leaving new ones. Adding "me too" comments just creates noise for us maintainers to have to sift through. If you have a new unique problem, please open new issues for them. |
2all: |
Description
I installed pyenv using homebrew. Every step along the way looked correct, however when I run
I get the following error
I have tried uninstalling and reinstalling and continue to receive this error. Please assist.
The text was updated successfully, but these errors were encountered: