debian8安装python3.7.3

**

编译安装openssl-1.1.1

**

下载

wget http://www.openssl.org/source/openssl-1.1.1.tar.gz

编译

./config --prefix=/usr/local/openssl shared zlib

安装

make && make install

添加环境变量

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openssl/lib" >> /etc/profile

重置环境变量

source /etc/profile

**

编译安装python-3.7.3

**

下载

wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz

编译

./configure --prefix=/usr/local/python3.7 --with-openssl=/usr/local/openssl

安装

make && make install

添加软链

ln -s /usr/local/python3.7/bin/python3.7 /usr/bin/python3.7

ln -s /usr/local/python3.7/bin/pip3.7 /usr/bin/pip3

添加软链之前,先检查/usr/bin跟/usr/local/bin这两个目录下有没有python3.7和pip3

如果有的话,删掉,然后再做软链,软链成功之后查看pip3和python3.7是否绑定成功,执行下面的命令

pip3 -V

然后就可以愉快的玩耍了~~~~

你可能感兴趣的:(服务器相关)