-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Installing local packages with transitive dependencies and extras not working #9204
Comments
Hello and thank you for your bug report! I'm sorry you're having trouble right now. Thank you for sharing your report with us. While we're waiting for the resolver developers to look at your report and respond, I'll mention here one useful troubleshooting and workaround tip from the documentation: If you run into resolution problems and need a workaround while you’re fixing their root causes, you can choose the old resolver behavior using the flag (If you don't mind, please also tell us what could have happened differently so you could have tested and caught and reported this during the pip resolver beta period.) |
Merging this into #8785 to avoid messages from scattering. |
It appears that #8785 didn't fix this issue. Running
|
I think putting |
I tried that but it is still producing the same output. I thought that the order of packages should be irrelevant with the new resolver? Anyway, in the install command above the packages were already listed according to their dependencies among each other: |
Ordering is still relevant, they are resolved in the same order as they are requested. But if installing works fine without extras, ordering is likely not the issue. I'll find some time to look into this. |
I'm also hitting this for https://github.com/certbot/certbot where we also have multiple packages depending on each other like this. In case it's useful, here's a stripped down example reproducing the problem with only two packages:
EDIT: Tweaked version numbers so the example still works as we continue to do releases. |
Figured out the issue. The reason why #8785 did not fix this is because the requirements provided in this issue are all unnamed (i.e. a bare path without Edit: Editable-ness is not actually relevant here (although editable requirements hit this issue more since they tend to be unnamed), so I’m removing that label. |
Pip (version 20.3+) seems to have problems resolving dependencies when trying to install packages from the filesystem with transitive dependencies and
extras
defined if for these packages also a distribution package onpypi
exists.Lets say there are the packages with dependencies defined by the following
setup.py
files:These
setup.py
files refer to the local development version which does not exist onpypi
. However, there exist release versions of these packages onpypi
.When now trying to install these packages locally from the filesystem with the extras specifier
pip (20.3) will fail with the following error message (pip 20.2.4 works however):
Runing pip with the
-v
switch it seems that pip tries to lookup theopentelemetry-sdk
package frompypi
even though it was specified in the command line as to be installed from the local filesystem.After trying around a little bit the following scenarios seem to work.
pip install -e './opentelemetry-api[test]' -e './opentelemetry-sdk[test]'
.pip install -e './opentelemetry-api' -e './opentelemetry-sdk' -e './opentelemetry-instrumentation'
setup.py
files (and also the dependencies) to something else that is not avialable onpypi
(e.g.opentelemetry-api
=py1
,opentelemetry-sdk
=py2
andopentelemetry-instrumentation
=py3
).install_requires
dependencies to include thetest
extra (e.g.opentelemetry-api[test] == 0.17.dev0
)So the problem seems to be a combination of transitive dependencies, extras and package lookup on
pypi
for packages installed from the local filesystem.The text was updated successfully, but these errors were encountered: