ubuntu1404 安装 pyenv 管理python版本
开源地址:https://github.com/pyenv/pyenv
不同系统参考 Common build problems 安装之前的必备工具
1 | #Ubuntu/Debian |
手动安装pyenv
1 | git clone https://github.com/pyenv/pyenv.git ~/.pyenv |
查看可安装Python版本
1 | pyenv install -l |
安装/卸载python
1 | pyenv install -v 3.7.2 |
python切换
1 | pyenv global 3.7.2 |
遇到问题:
- ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib
- ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED]
1
2sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs