Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frustration in Environment Setup #1664

Open
JustinGao20 opened this issue Jan 12, 2025 · 1 comment
Open

Frustration in Environment Setup #1664

JustinGao20 opened this issue Jan 12, 2025 · 1 comment

Comments

@JustinGao20
Copy link

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

@iorisa
Copy link
Collaborator

iorisa commented Jan 15, 2025

Recommended package version list: #1653

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants