程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Install Python 2 for Ubuntu 21.10

編輯:Python

First

install python2

sudo apt install python2

Check the... Available on the system Python edition :

ls /usr/bin/python* 

See if... Is configured Python Alternative version scheme , The order is as follows :

sudo update-alternatives --list python

Set up python Alternate version

ad locum , I will set up two Python replace :Python2 and Python3 edition .

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2

Confirm that both alternatives can be used , The order is as follows :

sudo update-alternatives --list python

 

Next select the optional Python edition .

sudo update-alternatives --config python

Enter your selection , For example, choose 1 To determine the installation python2 edition .

Last , Check your python edition

python -V

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved