Centos7 install Python3.7.3
1568 ワード
Centos7 install Python3.7.3
1.ダウンロード依存
2.python 3をダウンロードする.7.3インストールパッケージ
3.解凍パック
-----------------------------------------------------------------------------------------------------------------------------------------------------------
SSLモジュールに関するコメントを削除
-----------------------------------------------------------------------------------------------------------------------------------------------------------
4.インストール
5.以上
1.ダウンロード依存
sudo yum -y install gcc openssl-devel bzip2-devel libffi-devel
2.python 3をダウンロードする.7.3インストールパッケージ
wget --no-check-certificate https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
3.解凍パック
tar -xvf Python-3.7.3.tgz
-----------------------------------------------------------------------------------------------------------------------------------------------------------
SSLモジュールに関するコメントを削除
cd Modules
vim Setup.dist
-----------------
# 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
---------------------
=>
-----------------------
# 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
----------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------
4.インストール
cd Python3.7.3
./configure --enable-optimizations
# make altinstall python
make altinstall
5.以上
whereis python3
python3 -V
pip3 -V