ubuntu安装python3.8-ssl
- 下载 openssl
https://www.openssl.org/source/old/1.1.1/openssl-1.1.1d.tar.gz
注意:python3.8 最好下载高版本 openssl - 编译 openssl
1 | tar zxvf openssl-1.1.1d.tar.gz openssl-1.1.1d |
- 将编译后 openssl 动态库,加入搜索路径
1 | sudo mkdir lib64 |
- 下载 python3.8.5
https://www.python.org/downloads/source/ - 解压 python
1 | tar zxvf python3.8.5.tar.gz python3.8.5 |
- 修改配置
vi modules/Setup
放开如下注释:
1 | SSL=/usr/local/openssl |
- 编译 python
1 | sudo ./configure --prefix=/usr/local/python |
- 加入动态管理 python
1 | sudo update-alternatives --install /usr/bin/python python /usr/local/python/python3.8.5/bin/python3.8 3 |
ubuntu安装python3.8-ssl