Install python via pyenv on M1 macOS 12.3

I was helping our team’s non-dev folks to set up dev environment and faced a pyenv issue again.

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

Inspect or clean up the working tree at /var/folders/f3/32flyrb56gg5h45x3ntjrqpm0000gn/T/python-build.20220319140423.1512
Results logged to /var/folders/f3/32flyrb56gg5h45x3ntjrqpm0000gn/T/python-build.20220319140423.1512.log

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

By default, distutils will build C++ extension modules with "clang++".
If this is not intended, then set CXX on the configure command line.

I was like 🤯 🤯 🤯 since I did the same thing 2 weeks ago on my day 1 which was macOS 12.2.1

A workaround for that is the follwing.

$ brew install gcc # This will take so much time MacBook Pro 13 M1 chip took almost 1 hour$ CC=CC=/opt/homebrew/bin/gcc-11 pyenv install 3.7.10

You can check the path with which brew.




#CreativeCoding #Art #PhysicalComputing #IoT #MachineLearning #python #creativetech

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Happened in Fintech in 2021?

Multipart Upload to Ceph Object Storage with Python and Boto3

SQLite/SQLDelight ❤️ Kotlin Multiplatform

Are you a product developer or a project developer?

Replication Slot in Postgres

How Difficult Is It to Create an App?

Why separate policy from your code?

Design Pattern - Adapter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


#CreativeCoding #Art #PhysicalComputing #IoT #MachineLearning #python #creativetech

More from Medium

Time-Sampled Data Visualization with VueJS and GridDB | GridDB: Open Source Time Series Database…

Running Firebird the Open-Source Database on MacOS and docker

Firebird logo

How to send Cognito emails through any email service using CDK + Python

Export segment logs to AWS S3 with aws-cdk