Python扩展包的非官方Windows二进制文件的Christoph Gohlke命名约定

2024-05-12 19:00:13 发布

您现在位置:Python中文网/ 问答频道 /正文

Python wheels的命名约定是什么 Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages?在

例如,对于scipy,页面上有两个轮子的名称:

scipy-0.17.0-cp27-none-win32.whl

scipy-0.17.0-cp27-none-win_amd64.whl

“无”表示什么?在

win32和win峎amd64有什么区别?在

如果我使用的是x86或x86-64版本的Python(refPython 2.7.11),这有关系吗?在


Tags: nonewindowsscipywin命名wheelsx86amd64
2条回答

实际上这就是wheel工具“命名约定”。诚恳地说,我不确定“none”表示什么,但是是的,您的Python版本很重要。如果您使用的是32位解释器,那么继续使用win32选项(当然是在Windows下)。否则请下载64位发行版的win_amd64版本。在

希望有帮助!在

tl;dr:这是wheel命名约定,none表示它是纯python。在

我已经采取了额外的步骤来跟踪答案/评论。在

本例中的none可能是ABI标记。来自PEP 425

The ABI tag indicates which Python ABI is required by any included extension modules. For implementation-specific ABIs, the implementation is abbreviated in the same way as the Python Tag, e.g. cp33d would be the CPython 3.3 ABI with debugging.

因此,none在本例中意味着包被宣传为“纯python”(它的本地依赖项都不需要特定的应用程序二进制接口)。在

假设提供的控制盘文件是使用the official wheel file name convention的名称:

The wheel filename is {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl.

distribution

Distribution name, e.g. 'django', 'pyramid'.

version

Distribution version, e.g. 1.0.

build tag

Optional build number. Must start with a digit. A tie breaker if two wheels have the same version. Sort as the empty string if unspecified, else sort the initial digits as a number, and the remainder lexicographically.

language implementation and version tag

E.g. 'py27', 'py2', 'py3'.

abi tag

E.g. 'cp33m', 'abi3', 'none'.

platform tag

E.g. 'linux_x86_64', 'any'.

相关问题 更多 >