-
Notifications
You must be signed in to change notification settings - Fork 444
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
install --pip-args='--no-dependencies'
Error: cannot find package {dep_req.name!r} metadata
#1104
Comments
pipx install --pip-args='--no-dependencies'
Error: cannot find package {dep_req.name!r} metadata
install --pip-args='--no-dependencies'
Error: cannot find package {dep_req.name!r} metadata
Looking at the error thrown in (which I guess it's meant to be an f-string): Lines 130 to 134 in 331a581
Based on the output of Lines 36 to 43 in 331a581
And updating the function code to print-debug what package names it's comparing: print("START") # print-debug
for dist in distributions:
print(canonicalize_name(dist.metadata["name"]), canonicalize_name(package)) # print-debug
if canonicalize_name(dist.metadata["name"]) == canonicalize_name(package):
print("FOUND") # print-debug
return dist
print("NOT FOUND") # print-debug
return None It prints the following:
Taking in consideration |
How about running this instead?
Although the dependencies in requirements.txt won't be stored in the metadata, you can still check them with:
We are still trying to figure out how should we handle the metadata in #1037. |
Thanks @dukecat0, yes, that works as a workaround to my issue! What is pipx policy about potentially incomatible pip flags like this one? If it's hard (or low priority) to fix, maybe a better error message might be useful? |
Perhaps we can introduce an option like |
Yeah, that would work 👍 |
👍 |
Describe the bug
Running
pipx install --pip-args='--no-dependencies' yotta
outputs this error:I'm trying to use the
--no-dependencies
pip flag because with this is an old python application and in some environments/python-versions there are issues installing it's unpinned dependencies. So I'd like to first pipx installyotta
(a pure python package, with dependencies that are not) and then manually inject pinned versions of its dependencies to the pipx virtualenv.Basically
pipx install yotta
will fail in some cases, so I wanted to runpipx install --pip-args='--no-dependencies' yotta
+pipx inject yotta -r requirements.txt
How to reproduce
Simplest way might be with a Python docker container:
Inside the container:
Verbose output:
Expected behavior
To install the
yotta
package into a virtualenv without any of its dependencies.In the same docker container, running the same commands in a venv works:
Output
The text was updated successfully, but these errors were encountered: