I’m working on a project using Poetry, and I’ve encountered an issue with integrating a local package that I cloned from GitHub. Here’s the situation:
-
I have a Python project that uses Poetry for dependency management.
-
I found a bug in a third party package, so I cloned its repository to work on it locally.
-
I tried adding the local package to my Poetry project using:
poetry add ./buggy-one
But I get the error:
Could not find a matching version of package buggy-one
. If I manually adds to my.toml
the[tool.poetry.dependencies]... buggy-one = { path = './buggy-one' }
it is installed, but not in editable mode. -
I also tried using
pip install -e ./buggy-one
, but in new Ubuntu versions I encountered the errorexternally-managed-environment
inviting me to usepipx
… -
Using
pipx
is not an option for me because it installs the package in a separate environment.
In 2024, how I am supposed to work on a local package within my Poetry-managed project? Is there a way to properly link the local package so that I can develop and test it simultaneously with my main project?