Python3.7入れる時のOpenSSLエラー
以下の記事に続き、Python3.6まで大丈夫だけど、Python3.7インストール時にopensslエラーがでました
エラーがでたら以下のような表示になります。
$ pipenv --python 3.7.2 Warning: Python 3.7.2 was not found on your system… Would you like us to install CPython 3.7.2 with pyenv? [Y/n]: Y Installing CPython 3.7.2 with pyenv (this may take a few minutes)… ✘ Failed... Something went wrong… Downloading Python-3.7.2.tar.xz... -> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz Installing Python-3.7.2... 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 (CentOS Linux 7 using python-build 20180424) Inspect or clean up the working tree at /tmp/python-build.20190410073345.28295 Results logged to /tmp/python-build.20190410073345.28295.log Last 10 log lines: esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Looking in links: /tmp/tmpxo6kc0qg Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-18.1 setuptools-40.6.2 make[1]: Leaving directory `/tmp/python-build.20190410073345.28295/Python-3.7.2'
対処法としては以下のようにopensslのアップデートをすればOKです。
$ yum update openssl
やっぱりひっかかちゃいましたね。