centos7 configuration python

centos7 installed by default it is python2, if you need to use python3

yum install python36.x86_64

Install python

yum install python36-pip.noarch

Install python package management tool

# 36 is the latest version of python after the update centos should be replaced on the line 37 38 ...

If in order to save can be used directly

whereis python3 and whereis pip3 find the file path,

Then find the path with whereis python and whereis pip, (usually in / usr / bin below)

Copy the python3 and pip3 as python and pip, pip and the original python2 can use python2 and pip2

 

Guess you like

Origin www.cnblogs.com/fanhuo/p/11531848.html