Python/Python for Linux

[Python] CentOS 7 Python3 Install and Symbolc link

Pydole 2019. 3. 28. 14:29

 

 

1. Python Repository Install. (OS : CentOS 7)

 

 

 # yum install -y https://centos7.iuscommunity.org/ius-release.rpm

 

 

 

2. Python Install

 

 

 # yum install -y python36u python36u-libs python36u-devel python36u-pip

 

 

 

3. Install Complete

 

 

 # python3 -V

Python 3.6.8

 

 

 

4. python3 and pip Symbolc link

 

 

 # ls -l /usr/bin/python

    /usr/bin/python -> python2

 

 # rm /usr/bin/python
rm: remove symbolic link ‘/usr/bin/python’? y

 

 # ln -s /usr/bin/python3.6 /usr/bin/python

 

 # ls -l /usr/bin/python
    /usr/bin/python -> /usr/bin/python3.6

 

 # python -V
    Python 3.6.8

 

 # ln -s /usr/bin/pip3 /usr/bin/pip
 # ls -l /usr/bin/pip
    /usr/bin/pip -> /usr/bin/pip3