3. 配置 Python¶
3.1. 建置需求¶
要建置 CPython,你將需要:
一個 C11 編譯器。選擇性 C11 功能並非必要。
在 Windows 上需要 Microsoft Visual Studio 2017 或更新版本。
支援 IEEE 754 浮點數與浮點數非數值 (NaN)。
thread 的支援。
在 3.5 版的變更: 在 Windows 上現在需要 Visual Studio 2015 或更新版本。
在 3.6 版的變更: Selected C99 features, like <stdint.h> and static inline functions,
are now required.
在 3.7 版的變更: 執行緒支援現在是必要的。
在 3.11 版的變更: 現在需要 C11 編譯器、IEEE 754 和 NaN 支援。在 Windows 上需要 Visual Studio 2017 或更新版本。
See also PEP 7 "Style Guide for C Code" and PEP 11 "CPython platform support".
3.1.1. 可選模組的需求¶
Some optional modules of the standard library require third-party libraries installed for development (for example, header files must be available).
Missing requirements are reported in the configure output.
Modules that are missing due to missing dependencies are listed near the end
of the make output,
sometimes using an internal name, for example, _ctypes for ctypes
module.
If you distribute a CPython interpreter without optional modules, it's best practice to advise users, who generally expect that standard library modules are available.
建置可選模組的依賴項目為:
Dependency |
Minimum version |
Python 模組 |
|---|---|---|
建議使用 3.3.0 版本 |
||
2.5.0 |
||