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