3. 配置 Python

3.1. 构建要求

Features and minimum versions required to build CPython:

  • A C11 编译器。 Optional C11 features are not required.

  • On Windows, Microsoft Visual Studio 2017 or later is required.

  • 支持 IEEE 754 floating-point numbers and floating-point Not-a-Number (NaN) .

  • Support for threads.

  • OpenSSL 1.1.1 is the minimum version and OpenSSL 3.0.9 is the recommended minimum version for the ssl and hashlib extension modules.

  • SQLite 3.15.2 for the sqlite3 扩展模块。

  • Tcl/Tk 8.5.12 for the tkinter 模块。

  • Autoconf 2.71 and aclocal 1.16.5 are required to regenerate the configure 脚本。

3.1 版改变: Tcl/Tk version 8.3.1 is now required.

3.5 版改变: On Windows, Visual Studio 2015 or later is now required. Tcl/Tk version 8.4 is now required.

3.6 版改变: Selected C99 features are now required, like <stdint.h> and static inline 函数。

3.7 版改变: Thread support and OpenSSL 1.0.2 are now required.

3.10 版改变: OpenSSL 1.1.1 is now required. Require SQLite 3.7.15.

3.11 版改变: C11 compiler, IEEE 754 and NaN support are now required. On Windows, Visual Studio 2017 or later is required. Tcl/Tk version 8.5.12 is now required for the tkinter 模块。

Changed in version 3.13: Autoconf 2.71, aclocal 1.16.5 and SQLite 3.15.2 are now required.

另请参阅 PEP 7 “Style Guide for C Code” and PEP 11 “CPython platform support”.

3.2. Generated files

To reduce build dependencies, Python source code contains multiple generated files. Commands to regenerate all generated files:

make regen-all
make regen-stdlib-module-names
make regen-limited-abi
make regen-configure