Christoph Gohlke Naming Convention for Unofficial Windows Binaries for Python Extension Packages

笑着哭i 提交于 2019-12-23 10:09:55

问题


What is the naming convention used for the Python wheels at Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages?

For example, for scipy here are two of names of wheels on the page:

scipy-0.17.0-cp27-none-win32.whl

scipy-0.17.0-cp27-none-win_amd64.whl

What does 'none' indicate?

What's the difference between win32 and win_amd64?

Does it matter if I'm using the x86 or x86-64 version of Python (ref Python 2.7.11)?


回答1:


Actually that's the wheel tool "naming convention". Sincerely I'm not sure what "none" indicates, but yes, your Python version matters. If you're using the 32-bit interpreter, then go ahead with the win32 option (under Windows, of course). Otherwise download the win_amd64 version for 64-bit distributions.

Hope it helps!




回答2:


tl;dr: it's the wheel naming convention and none means it's pure python.

I've taken the extra step to follow answer/comments.

The none in this case is probably the ABI tag. From 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.

So none in this case means the package is advertised as "pure-python" (none of it's local dependencies require a specific application binary interface).

This is assuming the provided wheel files are names using 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'.



来源:https://stackoverflow.com/questions/35005870/christoph-gohlke-naming-convention-for-unofficial-windows-binaries-for-python-ex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!