LoginSignup
0
0

More than 3 years have passed since last update.

python 2.7.x を pyenv でインストールした時にエラーが出た場合の対処

Posted at

状況

macOS Mojave で pyenv を使って python2.7.x をインストールした時に下記のエラーが出た場合の対処方法。

Installing Python-2.7.16...
python-build: use readline from homebrew
ERROR: The Python zlib extension was not compiled. Missing the zlib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


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

Inspect or clean up the working tree at /var/folders/ml/r0_f1xbn5yl2fwql2wzczcf80000gn/T/python-build.20190802192417.48871
Results logged to /var/folders/ml/r0_f1xbn5yl2fwql2wzczcf80000gn/T/python-build.20190802192417.48871.log

...

参考

解決方法

$ brew install readline xz
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

pkg ファイルのバージョンは macOS のバージョンに合わせて読みかえる必要があります。また、最新の情報については参考 URL を参照する必要があります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0