LoginSignup
0
0

More than 1 year has passed since last update.

Ubuntu 22.04 に Python 2.7 をインストール(OS標準?)

Posted at

はじめに

Ubuntu 22.04にPython 2.7をインストール

サポート

保守期間不明。
OS EOLまで保守されるのだろうか?

LOG

インストール

# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

# apt update; apt install -y python
... 略
Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python2-minimal python2 dh-python 2to3 python-is-python3

E: Package 'python' has no installation candidate

# apt update; apt install -y python2

各種確認

# which python{,2,3}
/usr/bin/python2

# ll /usr/bin/python*
lrwxrwxrwx 1 root root       9 Jul 28  2021 /usr/bin/python2 -> python2.7*
-rwxr-xr-x 1 root root 3588440 Mar 12 06:24 /usr/bin/python2.7*

# python2 -V
Python 2.7.18

# apt show python2
Package: python2
Version: 2.7.18-3
Priority: optional
Section: universe/python
Source: python-defaults
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Matthias Klose <doko@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 70.7 kB
Provides: python-ctypes, python-email, python-importlib, python-profiler, python-wsgiref
Pre-Depends: python2-minimal (= 2.7.18-3)
Depends: python2.7 (>= 2.7.18~), libpython2-stdlib (= 2.7.18-3)
Suggests: python2-doc (= 2.7.18-3), python-tk (>= 2.7.18~)
Conflicts: python-central (<< 0.5.5)
Breaks: python (<< 2.7.15-2), python2-doc (<< 2.7.18-2), update-manager-core (<< 0.200.5-2)
Replaces: python (<< 2.7.15-2), python-dev (<< 2.6.5-2), python2-doc (<< 2.7.18-2)
Homepage: https://www.python.org/
Download-Size: 9098 B
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: interactive high-level object-oriented language (Python2 version)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0