pyenv: BUILD FAILED (Ubuntu 15.04 using python-build 20160509)

Panfeng Li picture Panfeng Li · May 14, 2016 · Viewed 12.8k times · Source

I have already installed the pyenv on my system, and the command pyenv install --list goes well. But when I download some Python versions using pyenv install 2.7.11, it turns out as follows:

Downloading Python-2.7.11.tgz...
-> https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
error: failed to download Python-2.7.11.tar.gz

BUILD FAILED (Ubuntu 15.04 using python-build 20160509)

I didn't find any similar problem on the official Common build problems.

Is it that pyenv didn't catch the new Ubuntu update?

Answer

nicolas.f.g picture nicolas.f.g · Apr 14, 2017

The command pyenv install -v 2.7.11 gave me a similar error.

Installing the pyenv requirements solved my issue :

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev

(See https://github.com/pyenv/pyenv/wiki/Common-build-problems)

Then :

pyenv install 2.7.11