py-limited-api must match '%s'
Package:
wheel
251
Exception Class:
ValueError
Raise code
self.root_is_pure = not (self.distribution.has_ext_modules()
or self.distribution.has_c_libraries())
if self.py_limited_api and not re.match(PY_LIMITED_API_PATTERN, self.py_limited_api):
raise ValueError("py-limited-api must match '%s'" % PY_LIMITED_API_PATTERN)
# Support legacy [wheel] section for setting universal
wheel = self.distribution.get_option_dict('wheel')
if 'universal' in wheel:
# please don't define this in your global configs
Links to the raise (1)
https://github.com/pypa/wheel/blob/6e86e6b886d7744cba1faa80bf3d12c8ac8db3f8/src/wheel/bdist_wheel.py#L219Ways to fix
Short answer:
Make sure you use version 3 of python/pip which you use to run command which gives exception.
python --version pip --version
We recommend always using python3 and pip3 as it gives a guarantee.
python3 --version pip3 --version
In pip output, you can find the connected python version in round brackets at the end of the line.
Explanation:
The wheel package is a PYPA official package that is used under the hood when you run commands related to package creation, installation, and so on. Most commonly it is pip, wheel, bdist_wheel commands.
If you check the latest wheel versions, you will see that actually used python version checked to match against: r'cp3\d' the source code
- cp - means CPython
- 3 - major python number
Add a possible fix
Please authorize to post fix