Skip to content

BUILD FAILED (OS X 12.0.1 using python-build 2.2.3-1-g423de9ae): "C compiler cannot create executables": "clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=12.0'" #2201

@gsantosoliver

Description

@gsantosoliver

Got the error:

BUILD FAILED (OS X 12.0.1 using python-build 2.2.3-1-g423de9ae)

Found some references on internet and in this git but none worked for me. I installed everything following the instructions on https://github.com/pyenv/pyenv#homebrew-in-macos

Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.

Prerequisite

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv issues. You should look for closed issues, too.
  • Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from plugins.
    • This repository is maintaining pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.

Description

  • Platform information (e.g. Ubuntu Linux 16.04): macOS Monterey version 12.0.1
  • OS architecture (e.g. amd64): Intel Core i7 64bits
  • pyenv version: pyenv 2.2.3-1-g423de9ae
  • Python version: Trying to install 3.8.6
  • C Compiler information (e.g. gcc 7.3):
gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.29)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  • Please attach the debug trace of the failing command as a gist:
    • Run env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.log and attach trace.log. E.g. if you have a problem with installing Python, run env PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log (note the -v option to pyenv install).

gosantos@MacBook-Pro ~ % env PYENV_DEBUG=1 pyenv install -v 3.8.6 2>&1 | tee trace.log

Produced the file:
trace.log

Gist
https://gist.github.com/gsantosoliver/f97422450d2036d63e2ae6ba15f23c8f

Metadata

Metadata

Assignees

No one assigned

    Labels

    third-partythe problem is in third-party software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions