Skip to content

Unable to install 3.7.9 using pyenv 2.2.5 on MacOS Monterey 12.3.1: "error: internal configure error for the platform triplet, please file a bug report" #2312

@ebarrios20

Description

@ebarrios20

System Version: macOS 12.3.1 (21E258)
Kernel Version: Darwin 21.4.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: MacBookPro 11.3.1

I tried to follow other similar issues such as #2171 and https://github.com/pyenv/pyenv/wiki/Common-build-problems. However, I was unable to fix this problem.

$pyenv install 3.7.9
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Installing Python-3.7.9...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 12.3.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/1p/9xg_6rvx2hg740d3kpqsw__c0000gp/T/python-build.20220404101916.21756
Results logged to /var/folders/1p/9xg_6rvx2hg740d3kpqsw__c0000gp/T/python-build.20220404101916.21756.log

Last 10 log lines:
checking for --with-cxx-main=<compiler>... no
checking for clang++... no
configure:

  By default, distutils will build C++ extension modules with "clang++".
  If this is not intended, then set CXX on the configure command line.
  
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report
make: *** No targets specified and no makefile found.  Stop.

$ pyenv doctor command returns: "Congratulations! You are ready to build pythons!" Only when I include the openssl prefixes.

CFLAGS="-I$(brew --prefix openssl)/include"
LDFLAGS="-L$(brew --prefix openssl)/lib"

Otherwise, I get the following error

$ pyenv doctor 
Cloning /Users/estebanbarrios/.pyenv/plugins/pyenv-doctor/bin/.....
Installing python-pyenv-doctor...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 12.3.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/1p/9xg_6rvx2hg740d3kpqsw__c0000gp/T/python-build.20220404102440.25262
Results logged to /var/folders/1p/9xg_6rvx2hg740d3kpqsw__c0000gp/T/python-build.20220404102440.25262.log

Last 10 log lines:
checking readline/readline.h, presence... no
checking for readline/readline.h,... no
checking readline/rlconf.h usability... yes
checking readline/rlconf.h presence... yes
checking for readline/rlconf.h... yes
checking for SSL_library_init in -lssl... no
configure: WARNING: OpenSSL <1.1 not installed. Checking v1.1 or beyond...
checking for OPENSSL_init_ssl in -lssl... no
configure: error: OpenSSL is not installed.
make: *** No targets specified and no makefile found.  Stop.
Problem(s) detected while checking system.

See https://github.com/pyenv/pyenv/wiki/Common-build-problems for known solutions.

I have also updated my XCode SDK to 13.3 from https://developer.apple.com/download/all/?q=Xcode by following #2201 (comment).
softwareupdate --all --install --force
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install


Here is my config log.
config.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions