centos 7 安装latest python 2.7.14
程序员文章站
2022-05-07 13:40:25
...
centos 7 安装最新的Python 2.7.14
1. 准备工作
sudo yum groupinstall "Development tools"
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-dev
2 .下载:
https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz
tar xf Python-2.7.14.tar.xz
cd Python-2.7.14
sudo ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
sudo make && sudo make altinstall
3. 安装 ez_setup
下载 https://bootstrap.pypa.io/ez_setup.py
安装: python ez_setup.py
4. 安装 pip
下载get-pip: wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
OK!