1

When trying to install past versions of Python using PyEnv, for example Python 3.6.14, I run into a build failed error. The command I am using is

$ pyenv install 3.6.14

The error I receive is

Downloading Python-3.6.14.tar.xz...
-> https://www.python.org/ftp/python/3.6.14/Python-3.6.14.tar.xz
Installing Python-3.6.14...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

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

Inspect or clean up the working tree at /var/folders/fj/7zh0_8qd1n76wwr6q1d47ywm0000gn/T/python-build.20220906233806.36658
Results logged to /var/folders/fj/7zh0_8qd1n76wwr6q1d47ywm0000gn/T/python-build.20220906233806.36658.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 am able to download newer versions with no trouble, including versions of Python 3.8 and onward. I can download select versions of Python 3.7, one version of Python 3.6, and none earlier than that. Here are the versions I've been able to download:

3.10.5 3.10.6 3.6.15 3.7.12 3.7.13 3.8.13 3.9.12 3.9.13 3.9.5

For some context, I am a graduate student learning about data engineering and foresee using older versions of Python in a virtual environment. I am aware that I could do something similar in Docker, but am interested in doing this via virtual environment.

My environment/framework versions are

  • MacOS Monterey 12.5.1
  • pyenv 2.3.4
  • Homebrew 3.5.10
  • Xcode 13.3.1
  • Global Python is Python 3.9.12
  • Because it is part of the error, I also feel it is necessary to say I have Apple clang version 13.1.6

I've read similar posts, but none worked. I've tried uninstalling and installing Xcode and Homebrew, but no dice. Same with trying --patchor installing other Homebrew libraries such as brew install readline xz and brew install openssl. I am open to other ways to install previous versions of Python, but would prefer to operate through PyEnv.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.