Docker容器Debian or Ubuntu or Mint系统编译安装python2.7.14

原创 楚盟  2018-01-05 06:39  阅读 338 views 次

Docker的时候发现它拉取的Debian or Ubuntu or Mint系统都极度精简,居然连python都木有,找了好多篇中午中文教程都没搞定,好在用谷歌找到一篇阿三写的英文教程完美解决了如何在docker系统下编译安装python2.7.14

一、前期基础准备命令

apt-get install update
apt-get install wget -y
apt-get install sudo
sudo apt-get update
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

二、下载编译安装python2.7.14

cd /usr/src
sudo wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
sudo tar xzf Python-2.7.14.tgz
cd Python-2.7.14
sudo ./configure
sudo make altinstall

三、查看python

python2.7 -V

文章来源:https://tecadmin.net/install-python-2-7-on-ubuntu-and-linuxmint/#

本文地址:https://www.5yun.org/14735.html
关注我们:请关注一下我们的微信公众号:扫描二维码楚盟网的公众号,公众号:chubin5yun
版权声明:本文为原创文章,版权归 楚盟 所有,欢迎分享本文,转载请保留出处!

发表评论


表情