首页 > 代码库 > Linux安装python

Linux安装python


先安装依赖的库:
yum install openssl -y
yum install openssl-devel -y
yum install gcc
yum install zlib
yum install zlib-devel

一、源码编译

官网地址(python2.7)

https://www.python.org/downloads/release/python-2710/

 

解压后执行, 执行指定prefix

./configure --prefix=/opt/python2.7

make && make install

Linux安装python