Two ways to install Python3 on Linux servers

Two ways to install Python3 on Linux servers

First method

Alibaba Cloud and Baidu Cloud servers are available! ! !

yum install python3

Second method

1. Download the compressed package of python3.6.5

wget http://cdn.npm.taobao.org/dist/python/3.6.5/Python-3.6.5.tgz

2. Unzip the compressed package

tar -zxvf Python-3.6.5.tgz

3. Installation

cd Python-3.6.5
yum install -y zlib*
yum install -y gcc

If it appears:

insert image description here

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup

Check the system version:

cat /etc/issue

insert image description here

Select the appropriate version of the source:

http://mirrors.163.com/.help/centos.html
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all
yum makecache

Then directly:

yum install python3

Then it still reports an error. . . .

The reason is that the CentOS6 version cannot install python3 directly from the source, but CentOS7 can! ! !

Summarize

The above are two ways to install Python3 on Linux servers introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed tutorial on installing Python 3.8.1 on Linux
  • Tutorial on upgrading and installing python 3.8 and configuring pip and yum under Linux
  • Detailed tutorial on installing python3 and corresponding pip environment under linux
  • Install Python 3.6 on Linux and avoid pitfalls
  • How to modify the default Python version when installing Python on Linux
  • Detailed explanation of upgrading Python and installing pip under Linux
  • Python 3.7.0 installation tutorial under Linux
  • How to install Python3 on Linux and coexist with the system's own Python2

<<:  Explanation of the usage scenarios of sql and various nosql databases

>>:  js to realize the production method of carousel

Recommend

MySQL tutorial thoroughly understands stored procedures

Table of contents 1. Concepts related to stored p...

Pure CSS to achieve the list pull-down effect in the page

You may often see the following effect: That’s ri...

Implementation of vite+vue3.0+ts+element-plus to quickly build a project

Table of contents vite function Use Environment B...

Thoroughly understand JavaScript prototype and prototype chain

Table of contents Preface Laying the foundation p...

View the port number occupied by the process in Linux

For Linux system administrators, it is crucial to...

Example code for css flex layout with automatic line wrapping

To create a flex container, simply add a display:...

CSS Transition expands and collapses elements by changing the Height

A common development need is that we want to coll...

Understanding MySQL Locking Based on Update SQL Statements

Preface MySQL database lock is an important means...

JS implements simple example code to control video playback speed

introduction I discovered a problem before: somet...

Embed codes for several older players

The players we see on the web pages are nothing m...

JavaScript determines whether the browser is IE

As a front-end developer, I can’t avoid IE’s pitf...

Use Vue3 for data binding and display list data

Table of contents 1. Comparison with Vue2 1. New ...