Python 2 の概要

The Python 2 package contains the Python development environment. It is useful for object-oriented programming, writing scripts, prototyping large programs or developing entire applications. This version is for backward compatibility with other dependent packages.

本パッケージは LFS-8.3 において正しくビルドでき動作することが確認されています。


  • ダウンロード (HTTP):

  • ダウンロード MD5 sum: a80ae3cc478460b922242f43a1b4094d

  • ダウンロードサイズ: 12 MB

  • 必要ディスク容量: 127 MB (additional 15 MB for tests)

  • 概算ビルド時間: 0.9 SBU (additional 6.6 SBU for tests)


任意の HTML ドキュメント

Python 2 の依存パッケージ


BlueZ-5.50, Valgrind-3.13.0

任意 (For Additional Modules)

SQLite-3.24.0, Tk-8.6.8


Python 2 のインストール

以下のコマンドを実行して Python 2 をビルドします。

./configure --prefix=/usr       \
            --enable-shared     \
            --with-system-expat \
            --with-system-ffi   \
            --with-ensurepip=yes \
            --enable-unicode=ucs4 &&

ビルド結果をテストする場合は make -k test を実行します。 1つのテストが失敗しますが理由は不明です。

root ユーザーになって以下を実行します。

make install &&
chmod -v 755 /usr/lib/

Since Python 2 is in maintenance mode, and Python 3 is recommended by upstream for development, you probably do not need to install the documentation. However, if you still want to install documentation for both Python versions, be sure to define the PYTHONDOCS variable for the version you want to use, each time you need to consult the documentation. If you have downloaded the preformatted documentation from, install it as the root user:

install -v -dm755 /usr/share/doc/python-2.7.15 &&

tar --strip-components=1                     \
    --no-same-owner                          \
    --directory /usr/share/doc/python-2.7.15 \
    -xvf ../python-2.7.15-docs-html.tar.bz2 &&

find /usr/share/doc/python-2.7.15 -type d -exec chmod 0755 {} \; &&
find /usr/share/doc/python-2.7.15 -type f -exec chmod 0644 {} \;


--with-system-expat: This switch enables linking against system version of Expat.

--with-system-ffi: This switch enables linking against system version of libffi.

--with-ensurepip=yes : This switch enables building pip and setuptools packaging programs. setuptools is needed for building some Python modules.

--enable-unicode=ucs4: This switch enables 32bit Unicode support in Python.

--with-dbmliborder=bdb:gdbm:ndbm: Use this switch if you want to build Python DBM Module against Berkeley DB instead of GDBM.

chmod ...: Fix permissions for libraries to be consistent with other libraries.

Python 2 の設定

In order for python to find the installed documentation, you must add the following environment variable to individual user's or the system's profile:

export PYTHONDOCS=/usr/share/doc/python-2.7.15


Installed Programs: 2to3, pydoc, python (symlink), python-config (symlink), python2 (symlink), python2-config (symlink), python2.7, python2.7-config,, and idle
Installed Libraries:
Installed Directories: /usr/{include,lib}/python2.7 and /usr/share/doc/python-2.7.15



is a Python program that reads Python 2.x source code and applies a series of fixes to transform it into valid Python 3.x code.


is a wrapper script that opens a Python aware GUI editor. For this script to run, you must have installed Tk before Python so that the Tkinter Python module is built.


Python ドキュメントツール。


is an interpreted, interactive, object-oriented programming language.


is a version-specific name for the python program.

is an SMTP proxy implemented in Python.

最終更新日: 2018-08-15 11:28:50 +0900