ModuleNotFoundError: No module named 'wheel'
yungwine opened this issue · comments
After
pip install wheel build
python -m build --wheel --sdist
I get an error
...
ModuleNotFoundError: No module named 'wheel'
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
but if I downgrade build
version to 1.0.3 the error goes away
You're building with isolation so the wheel
package from the outer environment would not be importable. Can you share more information about the project you are trying to build?
It looks as though you might've had an implicit dependency on wheel
when building your sdist. #716 removed wheel
from the build-system
table fallback. If you'd like to continue depending on wheel
for your sdists, you are gonna need to provide a build-system
. In your pyproject.toml
:
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "wheel"]
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]
Is fine. setuptools.build_meta
will request wheel
if it needs it.
I’m guessing we no longer build pure setup.py packages, then?
Ahh, you needed wheel for get_requires_for_build_sdist, okay, that’s why you need wheel. I’d recommend not importing wheel in setup.py, it does not consider its interface public. But okay, that’s to be expected then.