question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency resolution problem with non-pypi repository

See original GitHub issue

Version: 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.

  1. poetry add private-package
  2. poetry add public-package fails 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
ojiicommented, Feb 6, 2019

Any news on this? Is there a good argument not to use --extra-index-url rather than --index-url?

I’ve actually thought about a good reason not to use --extra-index-url. Say you have a private package privpkg on your private repo. If someone now uploads privpkg to the public repo, using --extra-index-url would pull that in.

Maybe a better solution would be something like:

[tool.poetry.dependencies]
privpkg = { version = "^2.13.0", repo = "privaterepo" }

Though this raises the question how private and public dependencies of privpkg are handled, I guess the lockfile could take care of that?

3reactions
ojiicommented, Dec 11, 2018

Is there a way to make private repositories behave like --extra-index-url rather than --index-url (in pip)? Ideally I’d like poetry to try pypi.org first, then fall back to the company pypi.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found