Ubuntu编译安装Python2.7.13

参考讨论

  1. 安装依赖
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
  1. 下载
version=2.7.13
mkdir ~/Downloads
cd ~/Downloads/
wget https://www.python.org/ftp/python/$version/Python-$version.tgz
  1. 解压
tar -xvf Python-$version.tgz
cd Python-$version
  1. 编译安装 ,一路回车安装完成
./configure
make
sudo checkinstall
  1. 安装PIP
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

你可能感兴趣的:(Ubuntu编译安装Python2.7.13)