事象
- macOS Ventura 13.5.2 に Python をインストールしようとすると ModuleNotFoundError: No module named '_lzma' と怒られる。
% pyenv install 3.11.6
python-build: use readline from homebrew
Downloading Python-3.11.6.tar.xz...
-> https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tar.xz
Installing Python-3.11.6...
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/azekyohe/.pyenv/versions/3.11.6/lib/python3.11/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.11.6 to /Users/azekyohe/.pyenv/versions/3.11.6