LoginSignup
1
0

More than 5 years have passed since last update.

Python 2.7 を消して回る on Debian Stretch

Last updated at Posted at 2017-06-23

クリーンインストールしてざっと見てました。あまり詳細知らないのでバックグラウンド知ってたら是非教えてください。

13:13@debian9 ~$ python --version
Python 2.7.13
13:13@debian9 ~$ python3 --version
Python 3.5.3
$ dpkg -l | grep python
ii  dh-python                      2.20170125                     all          Debian helper tools for packaging Python libraries and applications
ii  libpython-stdlib:amd64         2.7.13-2                       amd64        interactive high-level object-oriented language (default python version)
ii  libpython2.7:amd64             2.7.13-2                       amd64        Shared Python runtime library (version 2.7)
ii  libpython2.7-minimal:amd64     2.7.13-2                       amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64      2.7.13-2                       amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-stdlib:amd64        3.5.3-1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.5-minimal:amd64     3.5.3-1                        amd64        Minimal subset of the Python language (version 3.5)
ii  libpython3.5-stdlib:amd64      3.5.3-1                        amd64        Interactive high-level object-oriented language (standard library, version 3.5)
ii  python                         2.7.13-2                       amd64        interactive high-level object-oriented language (default version)
ii  python-apt-common              1.4.0~beta3                    all          Python interface to libapt-pkg (locales)
ii  python-minimal                 2.7.13-2                       amd64        minimal subset of the Python language (default version)
ii  python2.7                      2.7.13-2                       amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal              2.7.13-2                       amd64        Minimal subset of the Python language (version 2.7)
ii  python3                        3.5.3-1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apt                    1.4.0~beta3                    amd64        Python 3 interface to libapt-pkg
ii  python3-chardet                2.3.0-2                        all          universal character encoding detector for Python3
ii  python3-debian                 0.1.30                         all          Python 3 modules to work with Debian-related data formats
ii  python3-debianbts              2.6.1                          all          Python interface to Debian's Bug Tracking System
ii  python3-httplib2               0.9.2+dfsg-1                   all          comprehensive HTTP client library written for Python3
ii  python3-minimal                3.5.3-1                        amd64        minimal subset of the Python language (default python3 version)
ii  python3-pkg-resources          33.1.1-1                       all          Package Discovery and Resource Access using pkg_resources
ii  python3-pycurl                 7.43.0-2                       amd64        Python bindings to libcurl (Python 3)
ii  python3-pysimplesoap           1.16-2                         all          simple and lightweight SOAP Library (Python 3)
ii  python3-reportbug              7.1.7                          all          Python modules for interacting with bug tracking systems
ii  python3-requests               2.12.4-1                       all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-six                    1.10.0-3                       all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-urllib3                1.19.1-1                       all          HTTP library with thread-safe connection pooling for Python3
ii  python3.5                      3.5.3-1                        amd64        Interactive high-level object-oriented language (version 3.5)
ii  python3.5-minimal              3.5.3-1                        amd64        Minimal subset of the Python language (version 3.5)

Python 2.7 の方がすくなし。

$ apt-cache rdepends python2.7 --installed --recurse
python2.7
Reverse Depends:
  python2.7-minimal
  libpython2.7-stdlib
  python2.7-minimal
  libpython2.7-minimal
  libpython2.7
  python
python2.7-minimal
Reverse Depends:
  python2.7
  libpython2.7-minimal
  python2.7
  libpython2.7-minimal
  python-minimal
libpython2.7-stdlib
Reverse Depends:
  libpython2.7-minimal
  python2.7
  libpython-stdlib
  libpython2.7-minimal
  libpython2.7
libpython2.7-minimal
Reverse Depends:
  libpython2.7-stdlib
  python2.7-minimal
libpython2.7
Reverse Depends:
  mailutils
  libmailutils5
python
Reverse Depends:
  python-minimal
  python-minimal
  python-minimal
python-minimal
Reverse Depends:
  python
libpython-stdlib
Reverse Depends:
  python
mailutils
Reverse Depends:
libmailutils5
Reverse Depends:
  mailutils
13:13@debian9 ~$ apt show mailutils
Package: mailutils
Version: 1:3.1.1-1
Priority: optional
Section: mail
Maintainer: Jordi Mallach <jordi@debian.org>
Installed-Size: 1,059 kB
Provides: mail-reader, mailx
Depends: mailutils-common (= 1:3.1.1-1), default-mta | mail-transport-agent, guile-2.0-libs, libc6 (>= 2.14), libfribidi0 (>= 0.19.2), libgc1c2 (>= 1:7.2d), libgnutls30 (>= 3.5.0), libgsasl7 (>= 1.1), libkyotocabinet16v5 (>= 1.2.76), libldap-2.4-2 (>= 2.4.7), libmailutils5, libncurses5 (>= 6), libpam0g (>= 0.99.7.1), libpython2.7 (>= 2.7), libreadline7 (>= 6.0), libtinfo5 (>= 6), libwrap0 (>= 7.6-4~)
Suggests: mailutils-mh, mailutils-doc
Breaks: bsd-mailx (<< 8.1.2-0.20071201cvs-1), bsdmainutils (<< 8.0.6), elm-me+ (<< 2.4pl25ME+99c-3), heirloom-mailx (<< 12.3-3)
Homepage: http://www.gnu.org/software/mailutils/
Tag: interface::text-mode, mail::filters, mail::imap, mail::pop, mail::smtp,
 mail::user-agent, network::client, protocol::imap, protocol::pop3,
 protocol::smtp, protocol::ssl, role::program, suite::gnu,
 uitoolkit::ncurses, works-with::mail
Download-Size: 573 kB
APT-Manual-Installed: no
APT-Sources: http://ftp.jp.debian.org/debian stretch/main amd64 Packages
Description: GNU mailutils utilities for handling mail
 GNU Mailutils is a rich and powerful protocol-independent mail framework.
 It contains a series of useful mail libraries, clients, and servers.
 .
 This package contains the GNU mailutils versions of dotlock, frm, from,
 maidag, mail, messages, mimeview, movemail, readmsg and sieve. They are
 capable of speaking POP3, IMAP, mbox, MH and Maildir.
 .
  dotlock -- lock mail spool files.
  frm -- display From: lines.
  from -- display from and subject.
  maidag -- the mail delivery agent.
  mail -- the standard /bin/mail interface, mail sender and reader.
  messages -- count the number of messages in a mailbox.
  mimeview -- display files, using mailcap mechanism.
  movemail -- move messages across mailboxes.
  readmsg -- extract selected messages from a mailbox.
  sieve -- a mail filtering tool.

mailutils が libpython2.7 に依存している、というのが重要な依存関係なんでしょうか。消しちゃえ。

$ sudo apt remove libpython2.7-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  guile-2.0-libs libgc1c2 libgsasl7 libkyotocabinet16v5 libltdl7 liblzo2-2 libmariadbclient18 libntlm0 mailutils-common mysql-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libpython2.7-minimal libpython2.7-stdlib
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 11.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 34666 files and directories currently installed.)
Removing libpython2.7-stdlib:amd64 (2.7.13-2) ...
Removing libpython2.7-minimal:amd64 (2.7.13-2) ..

autoremoveとか色々やる

13:22@debian9 ~$ dpkg -l | grep -i python
ii  dh-python                      2.20170125                     all          Debian helper tools for packaging Python libraries and applications
ii  libpython3-stdlib:amd64        3.5.3-1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.5-minimal:amd64     3.5.3-1                        amd64        Minimal subset of the Python language (version 3.5)
ii  libpython3.5-stdlib:amd64      3.5.3-1                        amd64        Interactive high-level object-oriented language (standard library, version 3.5)
ii  python-apt-common              1.4.0~beta3                    all          Python interface to libapt-pkg (locales)
ii  python3                        3.5.3-1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apt                    1.4.0~beta3                    amd64        Python 3 interface to libapt-pkg
ii  python3-chardet                2.3.0-2                        all          universal character encoding detector for Python3
ii  python3-debian                 0.1.30                         all          Python 3 modules to work with Debian-related data formats
ii  python3-debianbts              2.6.1                          all          Python interface to Debian's Bug Tracking System
ii  python3-httplib2               0.9.2+dfsg-1                   all          comprehensive HTTP client library written for Python3
ii  python3-minimal                3.5.3-1                        amd64        minimal subset of the Python language (default python3 version)
ii  python3-pkg-resources          33.1.1-1                       all          Package Discovery and Resource Access using pkg_resources
ii  python3-pycurl                 7.43.0-2                       amd64        Python bindings to libcurl (Python 3)
ii  python3-pysimplesoap           1.16-2                         all          simple and lightweight SOAP Library (Python 3)
ii  python3-reportbug              7.1.7                          all          Python modules for interacting with bug tracking systems
ii  python3-requests               2.12.4-1                       all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-six                    1.10.0-3                       all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-urllib3                1.19.1-1                       all          HTTP library with thread-safe connection pooling for Python3
ii  python3.5                      3.5.3-1                        amd64        Interactive high-level object-oriented language (version 3.5)
ii  python3.5-minimal              3.5.3-1                        amd64        Minimal subset of the Python language (version 3.5)
13:23@debian9 ~$ python
zsh: command not found: python
$ apt install -s ansible
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ieee-data libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libyaml-0-2 python python-cffi-backend python-crypto python-cryptography python-enum34 python-httplib2 python-idna
  python-ipaddress python-jinja2 python-kerberos python-markupsafe python-minimal python-netaddr python-paramiko python-pkg-resources python-pyasn1 python-selinux python-setuptools
  python-six python-xmltodict python-yaml python2.7 python2.7-minimal
Suggested packages:
  cowsay sshpass python-doc python-tk python-crypto-dbg python-crypto-doc python-cryptography-doc python-cryptography-vectors python-enum34-doc python-jinja2-doc ipython
  python-netaddr-docs python-gssapi doc-base python-setuptools-doc python2.7-doc binutils binfmt-support
Recommended packages:
  python-winrm
The following NEW packages will be installed:
  ansible ieee-data libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libyaml-0-2 python python-cffi-backend python-crypto python-cryptography python-enum34 python-httplib2
  python-idna python-ipaddress python-jinja2 python-kerberos python-markupsafe python-minimal python-netaddr python-paramiko python-pkg-resources python-pyasn1 python-selinux
  python-setuptools python-six python-xmltodict python-yaml python2.7 python2.7-minimal
0 upgraded, 29 newly installed, 0 to remove and 0 not upgraded.
Inst libpython2.7-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Inst python2.7-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Inst python-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Inst libpython2.7-stdlib (2.7.13-2 Debian:9.0/stable [amd64])
Inst python2.7 (2.7.13-2 Debian:9.0/stable [amd64])
Inst libpython-stdlib (2.7.13-2 Debian:9.0/stable [amd64])
Conf libpython2.7-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Conf python2.7-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Conf python-minimal (2.7.13-2 Debian:9.0/stable [amd64])
Inst python (2.7.13-2 Debian:9.0/stable [amd64])
Inst python-crypto (2.6.1-7 Debian:9.0/stable [amd64])
Inst python-markupsafe (0.23-3 Debian:9.0/stable [amd64])
Inst python-jinja2 (2.8-1 Debian:9.0/stable [all])
Inst python-cffi-backend (1.9.1-2 Debian:9.0/stable [amd64])
Inst python-enum34 (1.1.6-1 Debian:9.0/stable [all])
Inst python-idna (2.2-1 Debian:9.0/stable [all])
Inst python-ipaddress (1.0.17-1 Debian:9.0/stable [all])
Inst python-pyasn1 (0.1.9-2 Debian:9.0/stable [all])
Inst python-pkg-resources (33.1.1-1 Debian:9.0/stable [all])
Inst python-setuptools (33.1.1-1 Debian:9.0/stable [all])
Inst python-six (1.10.0-3 Debian:9.0/stable [all])
Inst python-cryptography (1.7.1-3 Debian:9.0/stable [amd64])
Inst python-paramiko (2.0.0-1 Debian:9.0/stable [all])
Inst libyaml-0-2 (0.1.7-2 Debian:9.0/stable [amd64])
Inst python-yaml (3.12-1 Debian:9.0/stable [amd64])
Inst python-httplib2 (0.9.2+dfsg-1 Debian:9.0/stable [all])
Inst ieee-data (20160613.1 Debian:9.0/stable [all])
Inst python-netaddr (0.7.18-2 Debian:9.0/stable [all])
Inst ansible (2.2.1.0-2 Debian:9.0/stable [all])
Inst python-kerberos (1.1.5-2+b2 Debian:9.0/stable [amd64])
Inst python-selinux (2.6-3+b1 Debian:9.0/stable [amd64])
Inst python-xmltodict (0.10.2-1 Debian:9.0/stable [all])
Conf libpython2.7-stdlib (2.7.13-2 Debian:9.0/stable [amd64])
Conf python2.7 (2.7.13-2 Debian:9.0/stable [amd64])
Conf libpython-stdlib (2.7.13-2 Debian:9.0/stable [amd64])
Conf python (2.7.13-2 Debian:9.0/stable [amd64])
Conf python-crypto (2.6.1-7 Debian:9.0/stable [amd64])
Conf python-markupsafe (0.23-3 Debian:9.0/stable [amd64])
Conf python-jinja2 (2.8-1 Debian:9.0/stable [all])
Conf python-cffi-backend (1.9.1-2 Debian:9.0/stable [amd64])
Conf python-enum34 (1.1.6-1 Debian:9.0/stable [all])
Conf python-idna (2.2-1 Debian:9.0/stable [all])
Conf python-ipaddress (1.0.17-1 Debian:9.0/stable [all])
Conf python-pyasn1 (0.1.9-2 Debian:9.0/stable [all])
Conf python-pkg-resources (33.1.1-1 Debian:9.0/stable [all])
Conf python-setuptools (33.1.1-1 Debian:9.0/stable [all])
Conf python-six (1.10.0-3 Debian:9.0/stable [all])
Conf python-cryptography (1.7.1-3 Debian:9.0/stable [amd64])
Conf python-paramiko (2.0.0-1 Debian:9.0/stable [all])
Conf libyaml-0-2 (0.1.7-2 Debian:9.0/stable [amd64])
Conf python-yaml (3.12-1 Debian:9.0/stable [amd64])
Conf python-httplib2 (0.9.2+dfsg-1 Debian:9.0/stable [all])
Conf ieee-data (20160613.1 Debian:9.0/stable [all])
Conf python-netaddr (0.7.18-2 Debian:9.0/stable [all])
Conf ansible (2.2.1.0-2 Debian:9.0/stable [all])
Conf python-kerberos (1.1.5-2+b2 Debian:9.0/stable [amd64])
Conf python-selinux (2.6-3+b1 Debian:9.0/stable [amd64])
Conf python-xmltodict (0.10.2-1 Debian:9.0/stable [all])

ansibleめぇええええ! (羊の鳴き声

特に意味はありませんでしたがご参考になれば幸いです。

1
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
1
0