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
configure:

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 is ZelFlux

Garbage Collection in Modern Languages | Memory Allocation

[LeetCode] 2089. Find Target Indices After Sorting Array (Swift)

Django Tutorial #9: Wrap Things Up

Laravel Advance | How to Change Column Name and Data Type in Laravel Migration?

| Engineering News-Record

Congress.gov: Web Scraping with BeautifulSoup

Rails 6 Features: What’s New and Why It Matters

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
koji

koji

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

More from Medium

MacBook Pro — wifi channel disappears on 5Ghz wifi

Programmatically Publish a Markdown File as a Medium Story With Python

greyscale photo of a person using a macbook

Install Pentaho on Mac M1

5 Python Libraries to Build Command Line Tools