Python 3 の概要

Python 3 パッケージは Python 開発環境を提供します。 この環境は、オブジェクト指向プログラミング、スクリプト構築、大規模なプロトタイプ開発、一連のアプリケーション開発を可能とします。



Python 3 was installed in LFS. The only reason to rebuild it here is if optional modules are needed.

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


  • ダウンロード (HTTP):

  • ダウンロード MD5 sum: eb8c2a6b1447d50813c02714af4681f3

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

  • 必要ディスク容量: 175 MB (add 29 MB for tests)

  • 概算ビルド時間: 0.9 SBU (using parallelism=4; add 1.7 SBU for tests)

Python 3 の依存パッケージ


BlueZ-5.50, GDB-8.1.1 (いくつかのテストに必要), Valgrind-3.13.0

任意 (追加モジュール用)

Berkeley DB-5.3.28, SQLite-3.24.0


Python 3 のインストール

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

CXX="/usr/bin/g++"              \
./configure --prefix=/usr       \
            --enable-shared     \
            --with-system-expat \
            --with-system-ffi   \
            --with-ensurepip=yes &&

The test suite must be run separately, using an X terminal (see below).

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

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

The test suite must be run separately from the build, either before or after the package is built and installed. Do not run make install after running the test suite. To build and install the package, you need to start with a fresh or clean source tree. For the test, you also need a clean source code, so either start by removing the source code directory and starting over, by uncompressing the source tarball or by running make clean. Then configure again, adding 「--with-pydebug」 to the configure switches above, run make, then make test. Remember that tests must be executed using an X terminal. One test fails. The test SBU highly depends on the speed of the internet connection.


CXX="/usr/bin/g++" ./configure ...: Avoid an annoying message during configuration.

--with-system-expat: This switch enables linking against the 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.

--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 shared libraries to be consistent with other libraries.

Python 3 の設定

In order for python3 to find the installed documentation, create the following version independent symlink:

ln -svfn python-3.7.0 /usr/share/doc/python-3

and add the following environment variable to the individual user's or system's profile:

export PYTHONDOCS=/usr/share/doc/python-3/html


インストールプログラム: 2to3 (symlink), 2to3-3.7, idle3 (symlink), and idle3.7 pydoc3 (symlink), pydoc3.7, python3 (symlink); python3.7 and python3.7m (hardlinked); python3-config (symlink), python3.7-config (symlink), python3.7m-config, pyvenv (symlink), pyvenv-3.7,
インストールライブラリ: and
インストールディレクトリ: /usr/include/python3.7m, /usr/lib/python3.7, and /usr/share/doc/python-3.7.0



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.


is the Python documentation tool.


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


is a version-specific name for the python program.


creates virtual Python environments in one or more target directories.

最終更新日: 2018-08-22 07:38:20 +0900