-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: invalid command 'bdist_wheel' #4069
Comments
Ah, it's package's job to declare its build dependencies. The "Caused by" at the end is us trying to provide a helpful hint for how to fix it, but we can't know that that's actually the problem, and it would be spec incompliant for us to make assumptions about it. |
Related #2252 (comment) You could resolve this by using @konstin did you forget to make sure this special case message was only raised under |
I think it's helpful, but perhaps should be rephrased? It's way more helpful to know that the |
We indeed attach the context uncoditionally and lack the build isolation check. This shouldn't be the problem here, pyyaml 5.4.1 correctly declares a dependency on wheel (https://inspector.pypi.io/project/pyyaml/5.4.1/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz/PyYAML-5.4.1/pyproject.toml). Can you share the commands to reproduce the error? It installs successfully for me on older python and on newer pythons i get a different error (windows and ubuntu): $ uv venv -p 3.12
$ uv pip install pyyaml==5.4.1
Resolved 1 package in 280ms
error: Failed to download distributions
Caused by: Failed to fetch wheel: pyyaml==5.4.1
Caused by: Failed to build: `pyyaml==5.4.1`
Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit code: 1
--- stdout:
running egg_info
writing lib3\PyYAML.egg-info\PKG-INFO
writing dependency_links to lib3\PyYAML.egg-info\dependency_links.txt
writing top-level names to lib3\PyYAML.egg-info\top_level.txt
--- stderr:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 271, in <module>
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\dist.py", line 968, in run_command
super().run_command(command)
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 321, in run
self.find_sources()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 329, in find_sources
mm.run()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 550, in run
self.add_defaults()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\command\egg_info.py", line 588, in add_defaults
sdist.add_defaults(self)
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\command\sdist.py", line 102, in add_defaults
super().add_defaults()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 250, in add_defaults
self._add_defaults_ext()
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 335, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 201, in get_source_files
File "C:\Users\Konstantin\AppData\Local\uv\cache\.tmpTnVWP3\.venv\Lib\site-packages\setuptools\_distutils\cmd.py", line 107, in __getattr__
raise AttributeError(attr)
AttributeError: cython_sources
--- |
well, I'm just using nixos which makes 0 assumtions about the things that are installed. its absolute barebones python, no global packages. the only binary I got is python3.10 then I just do uv pip install pyyaml==5.4.1 |
Yeah, it's the fault of the package at that specific version. It looks like you need to use PyYAML 6.0.1 in order to have a working install. |
There is effectively nothing that uv can do here. That version of the package does not declare the correct build dependencies. So you either need to install them yourself out-of-band ( |
(Adding to the existing ticket because I think it's the same issue; if it's actually a different issue I'm happy to file a new ticket.) I switched a project from
This is in a container based on Debian 11 Bullseye. Please let me know if you're like a Dockerfile+docker-compose.yaml that reproduce the issue. Trying older releases, this appears to be a regression: 0.1.17 is the newest release that works for me, while 0.1.18 is the oldest release that fails for me. #2313 #2341 caught my eye in the commit titles 0.1.17...0.1.18 @charliermarsh I see at the time, your spider sense tingled #2313 (comment) The
The latest version of biopython git+https://github.com/biopython/biopython.git seems to behave the same as version 1.77. I can reproduce the issue with
|
Thanks for the write-up! I think this is expected since we use PEP 517 by default, and (as you noted) the package doesn't seem to install with |
## Summary PEP 517 build isolation #843 has not yet been mentioned in the PIP compatibility documentation. Add a section for it. ## Test Plan Visual inspection only ## Open Questions > in most cases, swapping out `pip install` for `uv pip install` should "just work". In the first non-trivial case I tried, it worked for a short time and then [started failing](#4069 (comment)). Is there any data out there on how many top 100 or top 1000 packages work with PEP 517 build isolation? How can someone specify `--no-build-isolation` for just one package/line in `requirements.txt`? --------- Co-authored-by: Charlie Marsh <[email protected]>
uv 0.2.6
when installing
pyyaml==5.4.1
I get:
If it knows what its missing, why doesn't it install that package?
The text was updated successfully, but these errors were encountered: