Ubuntu20.04 ubuntu / focal64にPython2をインストールする方法

問題の背景##

Python2は正式に廃止され、デフォルトでpython2を含まない新しいヘアスタイルバージョンubuntu20.04になりました。

インストールしようとすると、エラーが報告されます

sudo apt-get install -y python2

Unable to locate package python2

また、pipのインストールは機能しません

sudo apt-get install -y python-pip

Unable to locate package python-pip

解決##

キーポイント、宇宙の源を紹介する

sudo apt-get update

sudo apt-get upgrade -y

sudo apt-get update

sudo add-apt-repository universe

sudo apt install -y python2

curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py

sudo python2 get-pip.py

sudo pip install ansible==2.7.9

参照リンク##

https://websiteforstudents.com/how-to-install-python-pip-on-ubuntu-20-04-18-04/

元のリンク##

https://www.wxhmf.com/posts/install-python2-in-ubuntu-20.04/

Recommended Posts

Ubuntu20.04 ubuntu / focal64にPython2をインストールする方法
Ubuntu18.04にPython3.8をインストールする方法
[練習] Ubuntuシステムにpython3.6をインストールする方法
Ubuntu20.04にRubyをインストールする方法
Ubuntu20.04にMemcachedをインストールする方法
Ubuntu20.04にJavaをインストールする方法
Ubuntu20.04にMySQLをインストールする方法
Ubuntu20.04にElasticsearchをインストールする方法
UbuntuにProtobuf3をインストールするための詳細なチュートリアル
Ubuntu20.04にNginxをインストールする方法
Ubuntu16.04にNode.jsをインストールする方法
Ubuntu20.04にMySQLをインストールする方法
Ubuntu14.04にBacula-Webをインストールする方法
Ubuntu16.04にPostgreSQLをインストールする方法
Ubuntu20.04にGitをインストールする方法
Ubuntu18.04にAnaconda3をインストールする方法
Ubuntu16.04にJenkinsをインストールする方法
Ubuntu14.04にMemSQLをインストールする方法
Ubuntu20.04にGoをインストールする方法
Ubuntu16.04にMongoDBをインストールする方法
Ubuntu16.04にPrestaShopをインストールする方法
CentOS8にPython3.8をインストールする方法
Ubuntu18.04にKVMをインストールする方法
Ubuntu20.04にKVMをインストールする方法
ubuntu14.04にopencv3.0.0をインストールする方法
Ubuntu20.04にAnacondaをインストールする方法
Ubuntu16.04にPrometheusをインストールする方法
Ubuntu18.04にJenkinsをインストールする方法
Ubuntu20.04にApacheをインストールする方法
Ubuntu20.04にRをインストールする方法
CentOS8にPythonをインストールする方法
Ubuntu16.04にMoodleをインストールする方法
Ubuntu14.04にSolr5.2.1をインストールする方法
Ubuntu16.04にTeamviewerをインストールする方法
Ubuntu20.04にNginxをインストールする方法
Ubuntu20.04にMonoをインストールする方法
Ubuntu20.04にGoをインストールする方法
Ubuntu20.04にZoomをインストールする方法
Ubuntu16.04にNginxをインストールする方法
Ubuntu20.04にOpenCVをインストールする方法
Ubuntu20.04にSpotifyをインストールする方法
Ubuntu18.04にPostmanをインストールする方法
Ubuntu16.04にGo1.6をインストールする方法
Ubuntu18.04にGoをインストールする方法
Ubuntu14.04にMySQLをインストールする方法
Ubuntu20.04にPostgreSQLをインストールする方法
Ubuntu18.04にVLCをインストールする方法
Ubuntu20.04にTeamViewerをインストールする方法
Ubuntu20.04にWebminをインストールする方法
Ubuntu14.04にPython3をインストールします
UbuntuにPython3.7をインストールする
Ubuntu14.04にBaculaServerをインストールする方法
Raspberry Pi4にUbuntu19.10をインストールする方法
R&D:CentOS7にPython3をインストールする方法
Ubuntu18.04にApacheKafkaをインストールする方法
Ubuntu20.04にApacheMavenをインストールする方法
Ubuntu16.04にApacheTomcat8をインストールする方法
python3を使用してubuntuに3番目をインストールします
Ubuntu18.04にGCCコンパイラをインストールする方法
Ubuntu14.04にGraylog1.xをインストールする方法。
Ubuntu16.04サーバーにZabbixをインストールする方法