title: Error installing python 3.7.6 using pyenv on new macbook pro M1 in OS 12.3+
body: <p>I am struggling to install python version 3.7.6 using pyenv on my new macbook pro M1 running on mac os 12.3.1.</p>
  <p>My configuration</p>
  <pre><code>$ clang -v
  Apple clang version 13.1.6 (clang-1316.0.21.2)
  Target: arm64-apple-darwin21.4.0
  Thread model: posix
  InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  </code></pre>
  <pre><code>$ pyenv install 3.7.6
  
  python-build: use openssl@1.1 from homebrew
  python-build: use readline from homebrew
  Downloading Python-3.7.6.tar.xz...
  -&gt; https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tar.xz
  Installing Python-3.7.6...
  python-build: use tcl-tk from homebrew
  python-build: use readline from homebrew
  python-build: use zlib from xcode sdk
  
  BUILD FAILED (OS X 12.3.1 using python-build 2.2.5-10-g58427b9a)
  
  Inspect or clean up the working tree at /var/folders/4t/1qfwng092qz2qxwxm6ss2f1c0000gp/T/python-build.20220405170233.32567
  Results logged to /var/folders/4t/1qfwng092qz2qxwxm6ss2f1c0000gp/T/python-build.20220405170233.32567.log
  
  Last 10 log lines:
  checking for --with-cxx-main=&lt;compiler&gt;... no
  checking for clang++... no
  configure:
  
    By default, distutils will build C++ extension modules with &quot;clang++&quot;.
    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
  </code></pre>