在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