Centos7 install Python3.7.3
程序员文章站
2024-03-08 10:50:04
...
Centos7 install Python3.7.3
1. 下载相关依赖
sudo yum -y install gcc openssl-devel bzip2-devel libffi-devel
2. 下载python3.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
下一篇: 6.Python3.7循环
推荐阅读
-
Centos7 install Python3.7.3
-
CentOS7 安装python3.7
-
centos7升级Python
-
HOWTO install Hadoop on Windows
-
centos7常用命令
-
Centos7常用命令
-
Linux centos7环境下jdk安装教程
-
论Ubuntu和Centos7的一些使用区别
-
Install VBox Guest Addons And Auto Mount VBox Shared Folders 博客分类: Linux Virtual BoxGuest AdditionsCentOSRedHatLinux
-
linux centos7 yum 安装 博客分类: linux linuxcentos7yum安装