Dependency resolution problem with non-pypi repository
See original GitHub issueVersion: Poetry 0.12.10
I have a private PyPI server for company internal packages. Something in poetry seems to get confused when that private package has public dependencies. Specifically this case:
private-package depends on public-package which itself has further (public) dependencies.
poetry add private-packagepoetry add public-packagefails with[PackageNotFound]: Package [<private-package>] not found.
However poetry add works for public packages not depended on by private-package and also works for public packages which have no dependencies on their own, even if depended on by private-package.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Dependency Resolution - pip documentation v22.3.1
The process of determining which version of a dependency to install is known as dependency resolution. This behaviour can be disabled by passing...
Read more >Python Dependencies - Everything You Need to Know
Dependency conflicts occur when different Python packages have the same dependency, but depend on different and incompatible versions of that ...
Read more >Why does Pip disregard configured repository with nested ...
So pip tries to resolve the nested dependency by looking and installing cffi from the official PyPi repository. It completely ignores the repo...
Read more >pipdeptree - PyPI
Any package that's specified as a dependency of multiple packages with different versions is considered as a conflicting dependency. Conflicting dependencies ...
Read more >Best Practices for Python Dependency Management - Medium
For example, just run pip install numpy to install numpy and its dependencies. Pip also helps you to keep your version control repositories...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve actually thought about a good reason not to use
--extra-index-url. Say you have a private packageprivpkgon your private repo. If someone now uploadsprivpkgto the public repo, using--extra-index-urlwould pull that in.Maybe a better solution would be something like:
Though this raises the question how private and public dependencies of
privpkgare handled, I guess the lockfile could take care of that?Is there a way to make private repositories behave like
--extra-index-urlrather than--index-url(in pip)? Ideally I’d like poetry to try pypi.org first, then fall back to the company pypi.