Poetry – force install when versions are incompatible?

Question:

Poetry has a very good version solver, too good sometimes 🙂 I’m trying to use poetry in a project that uses two incompatible packages. However they are incompatible only by declaration as one of them is no longer developed, but otherwise they work together just fine.

With pip I’m able to install these in one environment (with an error printed) and it works. Poetry will declare that the dependencies versions can’t be resolved and refuse to install anything.

Is there a way to force poetry to install these incompatible dependencies? Thank you!

Asked By: geckon

||

Answers:

No.


Alternative solutions might be:

  • contacting the offending package’s maintainers and asking for a fix + release
  • forking the package and releasing a fix yourself
  • vendoring the package in your source code – there is no need to install it if it’s already there, and many of the usual downsides to vendoring disappear if the project in question is not maintained anymore
  • installing the package by hand post poetry install with an installer that has the option to ignore the dependency resolver, like pip (similar to what you’re already doing)
Answered By: Arne
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.