Linux下安装Python3
直接上脚本,哈哈
#!/bin/bash #FileName: python2_2_3.sh #Date: 20190514 #Author: LiLe #Contact: 836217653@qq.com #Version: V1.0 #Description: Centos7下python2升级成Python3 download(){ yum install wget zlib* gcc* opensslopenssl-devel wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz xz -d Python-3.7.3.tar.xz tar -xvf Python-3.7.3.tar } compile(){ yum install -y libffi libffi-devel cd Python-3.7.3 ./configure --prefix=/usr/local/python3 --with-ssl --enable-shared make && make install } create_link(){ ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 echo "/usr/local/python3/lib" >/etc/ld.so.conf.d/python3.conf ldconfig python3 --version } main(){ download compile create_link } main
作者:李先生
-------------------------------------------
个性签名:在平凡中坚持前行,总有一天会遇见不一样的自己!
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
万水千山总是情,打赏一分行不行,所以如果你心情还比较高兴,也是可以扫码打赏博主,哈哈哈(っ•̀ω•́)っ✎⁾⁾!
微信公众号 微信打赏 支付宝打赏
posted on 2019-12-24 16:38 Captain_Li 阅读(535) 评论(0) 编辑 收藏 举报