<p>I installed Sonoma and installed asdf then tried to install python3.7.15.</p>
<p>Set path for zlib .zshrc (if you use bash => .bashrc)</p>
<pre>
export CPPFLAGS="-I/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I$(brew --prefix openssl)/include"
export LDFLAGS="-L/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -L$(brew --prefix openssl)/lib"</pre>
<p>Then I got the following error.</p>
<pre>
asdf install python 3.7.15
python-build --patch 3.7.15 /Users/koji/.asdf/installs/python/3.7.15
with patch file from: https://github.com/python/cpython/commit/8ea6353.patch?full_index=1
python-build: use
[email protected] from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.15.tar.xz...
-> https://www.python.org/ftp/python/3.7.15/Python-3.7.15.tar.xz
Installing Python-3.7.15...
patching file 'Misc/NEWS.d/next/macOS/2020-06-24-13-51-57.bpo-41100.mcHdc5.rst'
patching file configure
1 out of 1 hunks failed--saving rejects to configure.rej
patching file configure.ac
1 out of 1 hunks failed--saving rejects to configure.ac.rej
BUILD FAILED (OS X 14.0 using python-build 2.3.25-6-g91002438)
Inspect or clean up the working tree at /var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/python-build.20230831024140.6153
Results logged to /var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/python-build.20230831024140.6153.log
Last 10 log lines:
/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/python-build.20230831024140.6153 ~/.asdf/plugins/python/pyenv
/var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/python-build.20230831024140.615
3/Python-3.7.15 /var/folders/gj/x6v5vwdx1v7741fdfcxwmr100000gn/T/python-build.20230831024140.6153 ~/.asdf/plugins/python/pyenv
Execution time: 4.13s</pre>
<p>The solution for the error was the following command</p>
<p><a href="https://koji-kanao.medium.com/when-asdf-install-python-3-7-15-got-errors-on-sonoma-c952c555513f"><strong>Website</strong></a></p>