pyenv installでERROR: The Python ssl extension was not compiled.


pyenv install 2.7.4 した時に

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 18.04 using python-build 1.2.13)

が出る

Wikiを見ろって書いてあるので見てみる

Common build problems
Simple Python version management. Contribute to pyenv/pyenv development by creating an account on GitHub.

Prerequisites

Make sure to follow this guidance for your platform before any troubleshooting.

  • Ubuntu/Debian
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 git

やってみたけどダメだった

次に

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

If you’re having trouble to get it to compile older python versions(<3.5) even after installing the recommended packages on ubuntu, changing the openssl lib might help:

sudo apt-get remove libssl-dev
sudo apt-get update
sudo apt-get install libssl1.0-dev

これで上手くいった

コメント

タイトルとURLをコピーしました