Centos 6.9 install Python3.7

# install python3
sudo yum -y update
sudo yum -y install yum-utils

yum install -y zlib-devel bzip2-devel ncurses-devel
yum install libffi-devel
sqlite-devel wget
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
tar xvf openssl-1.1.1b.tar.gz
cd openssl-1.1.1b
./config
make
make install
# openssl will be installed to /usr/local/ssl

# please add the path /usr/local/lib64 to /etc/ld.so.conf and run ldconfig
vi /etc/ld.so.conf
# add /usr/local/lib64
ldconfig
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
tar xzf Python-3.7.3.tgz
cd Python-3.7.3
vi Modules/Setup.dist
# uncomment the following lines
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
# :SSL=/usr/local/ssl
#  _ssl _ssl.c \
#     -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
#     -L$(SSL)/lib -lssl -lcrypto
./configure --enable-optimizations
make altinstall

上一篇:Hass.io: add-on Configurator


下一篇:Nginx Gzip 压缩配置