LoginSignup
1
0

More than 3 years have passed since last update.

MacOS Catalina でpyenv install できない時の対処

Posted at

備忘録として

MacOS Mojaveの時にも似たようなエラー pyenv install で Module Not Found Error :Zlib とかあったのですが、Catalina でも似たようなエラーがあったのでメモ。

エラー内容と対処法

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

Inspect or clean up the working tree at /var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083
Results logged to /var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083.log

Last 10 log lines:
  File "/private/var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083/Python-3.5.4/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/private/var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083/Python-3.5.4/Lib/ensurepip/__init__.py", line 209, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083/Python-3.5.4/Lib/ensurepip/__init__.py", line 116, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/private/var/folders/3h/68w9_bcx139176n71cbbbdg00000gn/T/python-build.20181003001910.1083/Python-3.5.4/Lib/ensurepip/__init__.py", line 40, in _run_pip
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1

がこんな感じであれば、

$ CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install {version}

で解決する。




関連リンク

1
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
1
0