7
user@syyun:~$ pyenv install 3.6.3
Downloading Python-3.6.3.tar.xz...
-> https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
Installing Python-3.6.3...

BUILD FAILED (Ubuntu 16.04 using python-build 1.1.5-8-g7b9d1a4)
Inspect or clean up the working tree at /tmp/python-build.20171020004725.32507
Results logged to /tmp/python-build.20171020004725.32507.log

Last 10 log lines:
    ensurepip._main()
  File "/tmp/python-build.20171020004725.32507/Python-3.6.3/Lib/ensurepip/__init__.py", line 189, in _main
    default_pip=args.default_pip,
  File "/tmp/python-build.20171020004725.32507/Python-3.6.3/Lib/ensurepip/__init__.py", line 102, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/tmp/python-build.20171020004725.32507/Python-3.6.3/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1079: recipe for target 'install' failed
make: *** [install] Error 1

Can't locate any related google-search record for above given error on pyenv install command.

Any guidance would be appreciate

Sooyul Yoon
  • 71
  • 1
  • 4
  • I'm seeing the same error – lostinplace Nov 20 '17 at 16:31
  • Does this answer your question? [pyenv: BUILD FAILED (Ubuntu 15.04 using python-build 20160509)](https://stackoverflow.com/questions/37227854/pyenv-build-failed-ubuntu-15-04-using-python-build-20160509) – Penny Liu Feb 24 '20 at 09:31

1 Answers1

12

This question is answered in the pyenv wiki. You have to prep your build environment first before trying to build a Python interpreter using pyenv.

According to the wiki, you need the following packages installed for Ubuntu:

apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev
wjv
  • 2,288
  • 1
  • 18
  • 21