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

pyenv Ubuntu16.04 ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

More than 1 year has passed since last update.

雑なメモです
環境: Ubuntu16.04
pyenvは公式の説明どおりインストール済み
pyenv install中に以下のようなエラーが出ました。

 % pyenv install 3.5.2              
Downloading Python-3.5.2.tar.xz...
-> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
Installing Python-3.5.2...
patching file Lib/venv/scripts/posix/activate.fish
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (Ubuntu 16.04 using python-build 1.2.9-2-g6309aaf)

Inspect or clean up the working tree at /tmp/python-build.20190116213835.24555
Results logged to /tmp/python-build.20190116213835.24555.log

Last 10 log lines:
(cd /home/pollenjp/.pyenv/versions/3.5.2/share/man/man1; ln -s python3.5.1 python3.1)
if test "xupgrade" != "xno"  ; then \
    case upgrade in \
        upgrade) ensurepip="--upgrade" ;; \
        install|*) ensurepip="" ;; \
    esac; \
     ./python -E -m ensurepip \
        $ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS

解決法

なんてことはない。。。ちゃんとPrerequisitesを入れていないだけだった。。。
https://github.com/pyenv/pyenv/wiki/common-build-problems#prerequisites

$ 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 libffi-dev liblzma-dev python-openssl
utvirtual
VRの普及啓蒙と体験創造を理念として、VR作品の制作・展示、勉強会などを行っているインカレサークル
http://utvirtual.tech/
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