MetaGPT
MetaGPT copied to clipboard
Resolving dependencies failed when using poetry
Seems like metagpt requires qdrant-client == 1.7.0, numpy == 1.24.3, while qdant-client requires numpy >=1.26
Here is my pyproject.toml
Maybe we can follow what langchain does, to isolate third-party dependencies like pip install langchain-openai
Qdrant is not in use, may be removed in the future. FYI: related issue.
Qdrant is not in use, may be removed in the future. FYI: related issue.
It seems this lib belongs to an example, may be we can isolate the libs required by examples or specified tools (like search api) from main dependencies.
I also encounter the same issue when trying to bring in MetaGPT as a dependency. The issue here is that purely using requirements.txt does not properly check dependency compatibility across packages (as is evident in this case).
The other issue is the practice of locking popular python packages (such as pydantic) down to a specific version, as opposed to a compatible version range. This severely limits the ability to bring in other 3rd party libraries which also rely on these dependencies.
For example if we were to look to langchain for how to best go about things:
numpy = "^1"
pydantic = ">=1,<3"
as compared to being locked down to specific versions as is the case in the current requirements.txt:
numpy==1.24.3
pydantic==2.5.3
[!NOTE] The original issue has been present since v0.7.1.
What about using poetry or rye as a package management tool?
@seehi
What about using poetry or rye as a package management tool?
I'd definitely recommend poetry as a candidate, its what I use currently and it seems to be used a fair bit nowadays.
Has this issue been resolved? I meet the same issue when install the lastest 0.8.1 with poetry.
Because qdrant-client (1.7.0) depends on numpy (>=1.26)
and metagpt (0.8.0) depends on numpy (1.24.3), qdrant-client (1.7.0) is incompatible with metagpt (0.8.0).
So, because metagpt-startup depends on metagpt (0.8.0) which depends on qdrant-client (1.7.0), version solving failed.
I had to use pip and python 3.9. Even had issues installing with 3.12 & pip. qdrant-client was blocking any variation when trying to poetry install.
For now, temporary solution would be poetry add git+https://github.com/geekan/MetaGPT.git.