Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to install python3 and pip3 in centos

Shulou Source: shulou.com Published: 2022-06-02 07:49:47 10月29日 Update

This article mainly explains "how to install python3 and pip3 in centos". The content in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "how to install python3 and pip3 in centos".

Because work requires an environment where python is installed, it has not been installed before. If you encounter some pits, I would like to record them.

Centos comes with a 2.7 version, but because what I need is a 3.6 + version. So you need to install an extra version of python3. Python can be installed through yum, there is no need to download the source package to compile and install.

-Segmentation line-official start-

After entering the server, enter the

Python-V

You can see the current version of python

Version 2.7 does not meet my needs, so I need to install an extra version of 3.6 +

Install the epel source first

Yum install epel-release-y

Next, install python3, and I'll use python3.6 as an example here.

Yum install python36-y

After the installation is complete, you can use the

Python3-V

See the version of python3 after installation

-and then there is my lack of talent and learning.

I naively thought that after installing python3, pip would also lead to the latest version (forgive my naivety).

After I encountered a problem installing some modules with pip, I typed

Pip-V

It turns out that pip corresponds to version 2.7 of python.

Next, record the method of installing pip3

Yum install python36-setuptools-yeasy_install-3.6 pip

After entering the above two commands, you can check the version of pip3 to see if pip3 is installed successfully

You can see that pip3 specifies python3.6. Then you can install some modules with pip3.

Finally, post a picture of the two versions of the current server python and pip

Thank you for your reading, the above is the content of "how to install python3 and pip3 in centos". After the study of this article, I believe you have a deeper understanding of how to install python3 and pip3 in centos, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Version Zhongan next learning input naive two content can be passed that is situation server module problem service necessity success lack of learning dividing line command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker MySQL OPPO Reno MariaDB