MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

Frustration in Environment Setup

Open JustinGao20 opened this issue 11 months ago • 2 comments

Bug description I have followed the environement setup guide in github listed below:

  1. conda create -n metagpt python=3.9 && conda activate metagpt
  2. pull the git repo
  3. pip install -r requirement.txt
  4. pip install --upgrade metagpt
  5. initilize the llm configuration
  6. 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

JustinGao20 avatar Jan 12 '25 15:01 JustinGao20

Recommended package version list: #1653

iorisa avatar Jan 15 '25 02:01 iorisa

This issue has no activity in the past 30 days. Please comment on the issue if you have anything to add.

github-actions[bot] avatar Feb 15 '25 00:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 01 '25 00:03 github-actions[bot]