Skip to content

Python 3.5 Issue #454

@nikolay

Description

@nikolay

Suddenly, I get this error when trying to install Python 3.5 (started to happen with the latest version) on OS X 10.11:

Last 10 log lines:
  File "/private/var/folders/cb/cxxqz_g94jd1x5tjwrklxgd00000gn/T/python-build.20151008192643.16552/Python-3.5.0/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/private/var/folders/cb/cxxqz_g94jd1x5tjwrklxgd00000gn/T/python-build.20151008192643.16552/Python-3.5.0/Lib/ensurepip/__init__.py", line 209, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/cb/cxxqz_g94jd1x5tjwrklxgd00000gn/T/python-build.20151008192643.16552/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/cb/cxxqz_g94jd1x5tjwrklxgd00000gn/T/python-build.20151008192643.16552/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
pyenv: version `3.5.0' is not installed

Activity

yyuu

yyuu commented on Oct 9, 2015

@yyuu
Contributor

You just don't have zlib.

thomasjo

thomasjo commented on Oct 9, 2015

@thomasjo
Contributor

@nikolay Ensure that your Xcode (including Command Line Tools) is up to date. Latest version is v7.0.1.

nikolay

nikolay commented on Oct 9, 2015

@nikolay
Author

I do have both, of course. zlib is installed via Homebrew and I have Xcode 7.1 beta and I haven't updated it since it worked last time, i.e. it's not the beta version of Xcode.

thomasjo

thomasjo commented on Oct 9, 2015

@thomasjo
Contributor

Well, something is wrong with your environment, because it works perfectly fine on my (clean) OS X 10.11 (15A284) system with Xcode 7.0.1 (7A1001).

karamosky

karamosky commented on Oct 9, 2015

@karamosky

Same issue for me too, 3.4.x build correctly but not 3.5, Xcode is up to date

nikolay

nikolay commented on Oct 9, 2015

@nikolay
Author

Well, I'm not sure what's wrong with my environment if 3.4.3 builds and 3.5.0 doesn't.

yyuu

yyuu commented on Oct 9, 2015

@yyuu
Contributor

Hmm, sounds interesting.

For more investigation, could you create a gist from output of 'pyenv install -v 3.5'?

swarajban

swarajban commented on Oct 18, 2015

@swarajban

@nikolay I had the same issue, and was able to fix by updating command line tools on OSX. Just run xcode-select --install

Once, that's finished, you should be able to install 3.5.0

nikolay

nikolay commented on Oct 20, 2015

@nikolay
Author

@swarajban I've done this, of course. It's not that. It does not work. I tried once more. Same exact issue. 3.4.3 works, 3.5.0 fails miserably.

yyuu

yyuu commented on Oct 21, 2015

@yyuu
Contributor

Umm. I've finished upgrading to El Capitan, but I couldn't reproduce the build failure of 3.5.0 on it....

VirtualWolf

VirtualWolf commented on Oct 27, 2015

@VirtualWolf

I was having the same problem. The fix for me, despite already having Xcode installed and up-to-date (7.1), was running xcode-select --install and installing the command line tools.

qtfkwk

qtfkwk commented on Oct 28, 2015

@qtfkwk

I also had this issue but it's fixed now via xcode-select --install... I have XCode 7.1... Homebrew, etc, are working fine otherwise... no complaints about xcode-select, libraries missing, etc before trying to install Python 3.5.0. I will try to remember to run xcode-select --install from now on after upgrading XCode. Here's a copy of my session:

$ pyenv install 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 20150818)

Inspect or clean up the working tree at /var/folders/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730
Results logged to /var/folders/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730.log

Last 10 log lines:
  File "/private/var/folders/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730/Python-3.5.0/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/private/var/folders/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730/Python-3.5.0/Lib/ensurepip/__init__.py", line 209, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730/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/t2/60dlskjn6hq8r4wbmnmp0_nm0000gn/T/python-build.20151028190759.49730/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 # clicked install button
xcode-select: note: install requested for command line developer tools
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
$ pyenv install 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 /Users/nick/.pyenv/versions/3.5.0
yyuu

yyuu commented on Nov 13, 2015

@yyuu
Contributor

Run xcode-select --install to fix installation of Command Line Tools for Xcode working.

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nikolay@thomasjo@yyuu@candu@swarajban

        Issue actions

          Python 3.5 Issue · Issue #454 · pyenv/pyenv