ubuntu16.04 server 安裝python2


由於16.04 server 默認安裝python 3.X ,部分應用需要依賴2.7 

原文:https://www.jianshu.com/p/743967c7ab1b

安裝:

下載Python2包,最新的版本為2.7.15
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz

解壓縮
tar -xvf Python-2.7.15.tgz

准備安裝
cd Python-2.7.15

安裝:
./configure 
make
sudo make install
 
        

 

if no installl  C++ env     do  next :

Installing the GNU C compiler and GNU C++ compiler

To install the gcc and g++ compilers, you will need the build-essential package. This will also install GNU make.

build-essential contains a list of packages which are essential for building Ubuntu packages including gcc compiler, make and other required tools.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ gcc -v
$ make -v

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM