码迷,mamicode.com
首页 > 编程语言 > 详细

docker -安装Python 脚本

时间:2020-01-04 01:03:40      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:tar   ssl   http   profile   ima   figure   pytho   docker   libtool   

#! /bin/bash
cd /tmp
echo "current direction is $(pwd)"
yum -y install wget
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
tar -zxvf Python-3.6.6.tgz
##python dependency
yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
yum -y install gcc automake autoconf libtool make
yum -y install gcc gcc-c++
echo "current direction is $(pwd)"
if [ -d /tmp/Python-3.6.6 ];then
echo "tar success .start make";
cd Python-3.6.6;
./configure --prefix=/tmp/python36;
make;
make install;
cd /tmp/python36
echo "python make end ,start env"
dir=$(pwd)
echo ‘PATH=$PATH:‘$dir/bin >> /etc/profile
source /etc/profile
echo "current PATH =$PATH"
mv /usr/bin/python /usr/bin/python_bak
ln -s $dir/bin/python3 /usr/bin/python



fi

技术图片

技术图片

docker -安装Python 脚本

标签:tar   ssl   http   profile   ima   figure   pytho   docker   libtool   

原文地址:https://www.cnblogs.com/iscys/p/12147401.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!