学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

# 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

posted on 2019-04-08 16:45  Jerry.Kwan  阅读(194)  评论(0编辑  收藏  举报