在ubuntu20.04下编译安装python2.7.17以编译Android4.4.2
2020/2/6 06 17:09
现在拿到的是测试版(非正式版/稳定版)。因此无法通过apt-get来安装python2.7。
非常时期有非常办法,直接源代码安装了!
一、下载:
https://www.python.org
https://www.python.org/downloads/
https://www.python.org/downloads/release/python-2717/
Files
Version Operating System Description MD5 Sum File Size GPG
Gzipped source tarball Source release 27a7919fa8d1364bae766949aaa91a5b 17535962 SIG
XZ compressed source tarball Source release b3b6d2c92f42a60667814358ab9f0cfd 12855568 SIG
macOS 64-bit/32-bit installer Mac OS X for Mac OS X 10.6 and later b19552ee752f62dd07292345aaf740f9 30434554 SIG
macOS 64-bit installer Mac OS X for OS X 10.9 and later 02a7ae49b389aa0967380b7db361b46e 23885926 SIG
Windows debug information files Windows eed87f356264a9977d7684903aa99402 25178278 SIG
Windows debug information files for 64-bit binaries Windows 117d7f001bd9a026866907269d2224b5 26005670 SIG
Windows help file Windows b14e17bd1ecf5803ba539750c4fb9550 6265114 SIG
Windows x86-64 MSI installer Windows for AMD64/EM64T/x64 55040ce1c1ab34c32e71efe9533656b8 20541440 SIG
Windows x86 MSI installer Windows 4cc27e99ad41cd3e0f2a50d9b6a34f79 19570688 SIG
下载链接:https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tgz
二、编译安装:
https://blog.csdn.net/nightelf00/article/details/89392297
ubuntu18.04下源码编译安装最新版本Python3
https://www.jianshu.com/p/89a020a6d4c0
ubuntu编译安装python3.6.4
百度搜索:ubuntu 编译安装python2.7
https://www.jianshu.com/p/c75b370fdff0
Ubuntu编译安装Python2.7.13
JomarWu
2018.05.06 11:23:34
字数 28
阅读 397
参考讨论
安装依赖
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
下载
version=2.7.13
mkdir ~/Downloads
cd ~/Downloads/
wget https://www.python.org/ftp/python/$version/Python-$version.tgz
解压
tar -xvf Python-$version.tgz
cd Python-$version
编译安装 ,一路回车安装完成
./configure
make
sudo checkinstall
安装PIP
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py