Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the script for shell to install python3 automatically

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to write the script for shell automatic installation of python3". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Root user rights

# vim installment python3.sh1 installed python3.sh1 steps in binStern. Shyum-y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-develwget https://www.python.org/ftp/python/3.7.0/python-3.7.0.tgztar-zxvf python-3.7.0.tgzmkdir / usr/local/python3cd python-3.7.0./configure-- prefix=/usr/local/python3make & & make Install [- f / usr/bin/python3] & & mv / usr/bin/python3 / usr/bin/python3_old [- f / usr/bin/pip3] & & mv / usr/bin/pip3 / usr/bin/pip3_oldln-s / usr/local/python3/bin/python3.7 / usr/bin/python3ln-s / usr/local/python3/bin/pip3.7 / usr/bin/pip3

Ps: take a look at the shell script-- install python3+pip with one click

Install python3.6.1

#! / bin/bashyum-y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel epel-release gccwget https://www.python.org/ftp/python/3.6.1/python-3.6.1.tgztar vxf python-3.6.1.tgzcd python-3.6.1./configure-- prefix=/usr/localmake & & make installcd.. yum-y install python-pip

Install python3.6.6

Yum install zlib zlib-devel readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs kernel-devel libxslt-devel libffi-devel python-devel zlib-devel openldap-devel sshpass gcc git-yyum install http://www.percona.com/downloads/percona-release/redhat/0.1-6/percona-release-0.1-6.noarch.rpm-yyum install percona-server-server-56 install percona-server-devel-56-ywget https://www.python.org/ftp/ Python/3.6.6/python-3.6.6.tgz # centos 7 does not need to install python2.7tar-xzvf python-3.6.6.tgzcd python-3.6.6./configure-- prefix=/usr/local/python3make allmake installmake cleanmake distclean ln-s / usr/local/python3/bin/python3 / usr/bin/python3ln-s / usr/local/python3/bin/pip3 / usr/bin/pip3 "how to write a script for shell to automatically install python3" ends here Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report