Frustration in Environment Setup
Bug description I have followed the environement setup guide in github listed below:
- conda create -n metagpt python=3.9 && conda activate metagpt
- pull the git repo
- pip install -r requirement.txt
- pip install --upgrade metagpt
- initilize the llm configuration
- now I try to run my code that is fine with importing statements like from metagpt.actions import Action, and from metagpt.team import Team, however, the importing statement from metagpt.rag.engines import SimpleEngine really gives me a headache. First, I encountered an error cannot import name 'Url' from 'pydantic.networks', which I found the reason was that the pydantic version is too new on my side, which is pydantic-2.10.5 that replaces Url with AnyUrl or HttpUrl So, I downgrade my pydantic verison to 2.6.4 and install the corresponding llama-index version 0.10.0, however, I found that it now gives me another error module not Found Error, no module named 'llama_index.vector_stores" which is because my llama index version is too old, the version 0.12.10 has vector stores But when I update my llama_index version I found that llama_index 0.12.10 depends on pydantic version 2.10.5 so it is a cicular dependency now. I do not know how to solve it
Bug solved method
I do not know how to solve it with the conflict on pydantic and llama_inndex, even if I disable the import statement, the system seems to import the SimpleEngine automatically
Environment information
- LLM type and model name: api_type: "ollama", model: "llama3.2",base_url: "http://localhost:11434", api_key: "dummy"
- System version: MacOS
- Python version: conda 3.9
- MetaGPT version or branch: 0.8.1
- packages version: pydantic 2.6.4/2.10.5, llama_index 0.10.0/0.12.10
- installation method: pip install
Screenshots or logs
Recommended package version list: #1653
This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add.
This issue was closed due to 45 days of inactivity. If you feel this issue is still relevant, please reopen the issue to continue the discussion.