Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of 'cp3xm' and 'cp2xm' in the name of Python wheels?

To my knowledge, the naming rules of python wheel is

package_version-related_python_version-none-32bits_or_64bits.whl

For example,

numpy‑1.11.2+mkl‑cp35‑none‑win_amd64.whl

is numpy of version 1.11.2 for Python3.5 running in windows 64 bits platform. Reference

Currently i have noticed the naming of Python packages in Unofficial Windows Binaries for Python Extension Packages use 'cpxxm' to replace 'none'. For example,

numpy‑1.11.2+mkl‑cp35‑cp35m‑win_amd64.whl

When installing these packages, pip will return version unmatch error. When i change 'cp35m' to 'none', it becomes normal.

So, what is the meaning of 'cp2xm' 'cp3xm' and why suddenly all the package replace 'none' with 'cpxxm'?

like image 919
zhi lim Avatar asked Nov 16 '16 06:11

zhi lim


People also ask

What does wheel mean in Python?

What Is a Python Wheel? A Python . whl file is essentially a ZIP ( . zip ) archive with a specially crafted filename that tells installers what Python versions and platforms the wheel will support. A wheel is a type of built distribution.

How do you name a wheel in Python?

The wheel filename is {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}. whl . Distribution name, e.g. 'django', 'pyramid'.

Why is it called wheel Python?

The joke was that PyPI was initially like that - it had nothing in it back then. Based off that, wheel is a reference to wheels of cheese. Also the current iteration of pypi.org is called Warehouse, reflecting the fact that all cheese are not only expected but required to be stored on PyPI.

What is wheel and Setuptools in Python?

Wheel and Egg are both packaging formats that aim to support the use case of needing an install artifact that doesn't require building or compilation, which can be costly in testing and production workflows. The Egg format was introduced by setuptools in 2004, whereas the Wheel format was introduced by PEP 427 in 2012.


1 Answers

From PEP 3149 the m indicates pymalloc is in use as the memory allocator

The second component of the wheel name is the "abi" component. This was always none in wheels produced by older versions of wheel <26 as abi detection wasn't yet implemented.

In newer versions of wheel, the abi is populated. You need a sufficiently new version of pip in order to install these wheels.

like image 134
Anthony Sottile Avatar answered Oct 02 '22 13:10

Anthony Sottile