$ pyenv install 3.12.4 python-build: use openssl@3 from homebrew python-build: use readline from homebrew Downloading Python-3.12.4.tar.xz... -> https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz Installing Python-3.12.4... python-build: use readline from homebrew python-build: use zlib from xcode sdk Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/keoinn/.pyenv/versions/3.12.4/lib/python3.12/lzma.py", line 27, in <module> from _lzma import * ModuleNotFoundError: No module named '_lzma' WARNING: The Python lzma extension was not compiled. Missing the lzma lib? Installed Python-3.12.4 to /Users/keoinn/.pyenv/versions/3.12.4
解決方法
1
brew install xz
成功安裝提示訊息
1 2 3 4 5 6 7 8 9
$ pyenv install 3.12.4 python-build: use openssl@3 from homebrew python-build: use readline from homebrew Downloading Python-3.12.4.tar.xz... -> https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz Installing Python-3.12.4... python-build: use readline from homebrew python-build: use zlib from xcode sdk Installed Python-3.12.4 to /Users/keoinn/.pyenv/versions/3.12.4