ModuleNotFoundError: No module named 'wheel.cli'
Los mantenedores suelen responder en 1 día
@C0rn3j ya está trabajando en esto.
Desde el 24/3/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- build-system
Línea de trabajo
Comienza en pythonforandroid/recipe.py, en install_wheel, donde falla la importación desde wheel.cli.tags, y compárala con el uso de wheel.wheelfile mostrado en el issue. Reproduce el fallo de compilación de Android y verifica después que la instalación de wheel y el retagging de la plataforma funcionan sin el módulo no disponible.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Looks like p4a is using a privated wheels.cli module which was part of https://github.com/pypa/wheel/pull/655
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1246, in <module>
main()
~~~~^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
~~~~~~~~~~~^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 677, in __init__
getattr(self, command)(args)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func
build_dist_from_args(ctx, dist, args)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
getattr(args, "private", None),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
),
^^
)
^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 517, in build_recipes
recipe.build_arch(arch)
~~~~~~~~~~~~~~~~~^^^^^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1340, in build_arch
self.install_wheel(arch, built_wheels)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/home/user/Projects/Tauon/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1283, in install_wheel
from wheel.cli.tags import tags as wheel_tags
ModuleNotFoundError: No module named 'wheel.cli'
EDIT: Worked around with an LLM:
def _retag_wheel_platform(self, path, new_platform_tag, remove_old=True):
"""
Rename a wheel by replacing only its platform tag.
Wheel filename format:
{dist}-{version}(-{build})?-{python tag}-{abi tag}-{platform tag}.whl
We split from the right so project names/build tags containing '-' still work.
"""
p = Path(path)
if p.suffix != ".whl":
raise ValueError(f"Not a wheel: {path}")
parts = p.stem.rsplit("-", 3)
if len(parts) != 4:
raise ValueError(f"Unexpected wheel filename format: {p.name}")
left, py_tag, abi_tag, _old_platform_tag = parts
new_name = f"{left}-{py_tag}-{abi_tag}-{new_platform_tag}.whl"
new_path = p.with_name(new_name)
if new_path != p:
p.rename(new_path)
if not remove_old and new_path != p:
# rename already removed old path, so if you truly want both,
# copy instead of rename
pass
return str(new_path)
def install_wheel(self, arch, built_wheels):
with patch_wheel_setuptools_logging():
from wheel.wheelfile import WheelFile
_wheel = built_wheels[0]
built_wheel_dir = dirname(_wheel)
selected_wheel = self._retag_wheel_platform(
_wheel,
self.get_wheel_platform_tag(arch),
remove_old=True,
)
_dev_wheel_dir = environ.get("P4A_WHEEL_DIR", False)
if _dev_wheel_dir:
ensure_dir(_dev_wheel_dir)
shprint(sh.cp, selected_wheel, _dev_wheel_dir)
info(f"Installing built wheel: {basename(selected_wheel)}")
destination = self.ctx.get_python_install_dir(arch.arch)
with WheelFile(selected_wheel) as wf:
for zinfo in wf.filelist:
wf.extract(zinfo, destination)
- Lenguaje dominante
- Python
- Estrellas
- 8.9k
- Forks
- 2k
- Merge medio
- 5 d 1 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de kivy/python-for-android
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
kivy/python-for-android#3335 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
Documentation easy
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
kivy/python-for-android#3326 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Documentation easy Priority: Low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
kivy/python-for-android#3299 ·
Los mantenedores suelen responder en 1 día
-
bug: recipes: ffmpeg: hardware acc flags override --disable-everything flagPosiblemente ocupada @r3wretrhy la tomó hace 11 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
kivy/python-for-android#3382 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
kivy/python-for-android#3381 ·
Los mantenedores suelen responder en 1 día
Todos los issues de kivy/python-for-android
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aicell-lab/bioengine#232 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
modelscope/evalscope#1836 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jbaruch/speaker-toolkit#480 ·
Los mantenedores suelen responder en 1 día