How to install a different version of Python on mac for a single project

Viewed 397

I need to run python 3.6 but have 3.9 on my mac, which is running Big Sur. I followed the instructions on pyenv's github and then when I run

pyenv install 3.6.15

I get the following error.

python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 11.6.1 using python-build 2.2.0-5-g54889eb8)

Inspect or clean up the working tree at /var/folders/77/93y4tp5x557ff0h_3f76bh5c0000gn/T/python-build.20211103180947.22099
Results logged to /var/folders/77/93y4tp5x557ff0h_3f76bh5c0000gn/T/python-build.20211103180947.22099.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.

I have reinstalled the xcode command line tools, reinstalled every dependency that pyenv mentions, and have done a full software update on my mac. The same error continues to show up.

I am running version 11.6.1 of Big Sur and 2.2.0 of pyenv.

0 Answers
Related