Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyenv install 3.6.3 error occurring : why?

Tags:

pyenv

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

like image 258
Sooyul Yoon Avatar asked Oct 19 '17 15:10

Sooyul Yoon


People also ask

How do I install python 3.6 on Mac?

On MacOS, the recommended way to get Python 3. x on your machine is to use the HomeBrew utility. HomeBrew is a package manager similar to the PowerShell Gallery that allows users to download and install programs from a public repository.

How do I know if Pyenv is installed?

To verify pyenv installation, just type pyenv doctor . By default, checking development tools to build CPython.


1 Answers

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
like image 163
wjv Avatar answered Oct 03 '22 19:10

wjv