Help us understand the problem. What is going on with this article?

MacでPython 3.5.0インストールに失敗したら

More than 3 years have passed since last update.

環境

  • OSX El Capitan Version 10.11.1
  • pyenv 20151105-76-g3428431

インストール

試みる

% pyenv install 3.5.0
Downloading readline-6.3.tar.gz...
-> https://yyuu.github.io/pythons/56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
Installing readline-6.3...
Installed readline-6.3 to $HOME/.anyenv/envs/pyenv/versions/3.5.0

Downloading Python-3.5.0.tgz...
-> https://yyuu.github.io/pythons/584e3d5a02692ca52fce505e68ecd77248a6f2c99adf9db144a39087336b0fe0
Installing Python-3.5.0...

BUILD FAILED (OS X 10.11.1 using python-build 20151124-5-gebd6c1a)

Inspect or clean up the working tree at /var/folders/jw/qq4kz4hd17lbgv__hgym0z_c0000gp/T/python-build.20151202010623.52953
Results logged to /var/folders/jw/qq4kz4hd17lbgv__hgym0z_c0000gp/T/python-build.20151202010623.52953.log

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

失敗したら

% xcode-select --install

もう一度インストール挑戦

% pyenv install 3.5.0
Downloading readline-6.3.tar.gz...
-> https://yyuu.github.io/pythons/56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
Installing readline-6.3...
Installed readline-6.3 to $HOME/.anyenv/envs/pyenv/versions/3.5.0

Downloading Python-3.5.0.tgz...
-> https://yyuu.github.io/pythons/584e3d5a02692ca52fce505e68ecd77248a6f2c99adf9db144a39087336b0fe0
Installing Python-3.5.0...
Installed Python-3.5.0 to $HOME/.anyenv/envs/pyenv/versions/3.5.0

成功

% pyenv global 3.5.0
% pyenv versions
  system
  2.7.10
* 3.5.0 (set by $HOME/.anyenv/envs/pyenv/version)
infiniteloop
「ソースコードでなんでも生み出す」なんでもない記号から、とんでもないモノを生み出す。日々技術を磨き続け、あらゆる難題に答えていく札幌のシステム会社です。
https://www.infiniteloop.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした