Skip to content

Trouble installing metagpt #1825

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

Open
Lynx-1221 opened this issue May 11, 2025 · 7 comments
Open

Trouble installing metagpt #1825

Lynx-1221 opened this issue May 11, 2025 · 7 comments

Comments

@Lynx-1221
Copy link

When running pip install metagpt, got this error:
error: resolution-too-deep

× Dependency resolution exceeded maximum depth
╰─> Pip cannot resolve the current dependencies as the dependency graph is too complex for pip to solve efficiently.

hint: Try adding lower bounds to constrain your dependencies, for example: 'package>=2.0.0' instead of just 'package'.

Link: https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors

The installation had already reached:
Collecting psutil (from ipykernel==6.27.1->metagpt)
Using cached psutil-5.9.8-cp37-abi3-win_amd64.whl.metadata (22 kB)
Collecting ordered-set<5.0.0,>=4.0.0 (from agentops->metagpt)
Using cached ordered-set-4.0.2.tar.gz (10 kB)
Preparing metadata (setup.py) ... done

but there seems to be an error installing. Can anyone help? Thank you

@fgalind1
Copy link

similar issue found and unable to resolve some dependencies, tried on linux with python 3.11

The conflict is caused by:
    google-generativeai 0.4.1 depends on protobuf
    google-ai-generativelanguage 0.4.0 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.19.5
    grpcio-status 1.62.3 depends on protobuf>=4.21.6
    grpcio-tools 1.62.3 depends on protobuf<5.0dev and >=4.21.6
    google-api-core 1.34.1 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <4.0.0dev and >=3.19.5
    google-generativeai 0.4.1 depends on protobuf
    google-ai-generativelanguage 0.4.0 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.19.5
    grpcio-status 1.62.3 depends on protobuf>=4.21.6
    grpcio-tools 1.62.3 depends on protobuf<5.0dev and >=4.21.6
    google-api-core 1.34.0 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <4.0.0dev and >=3.19.5

@limboys
Copy link

limboys commented May 18, 2025

Can you provide us with the metagpt version, python version, and installation commands to help us troubleshoot?

@limboys
Copy link

limboys commented May 19, 2025

When running pip install metagpt, got this error: error: resolution-too-deep

× Dependency resolution exceeded maximum depth ╰─> Pip cannot resolve the current dependencies as the dependency graph is too complex for pip to solve efficiently.

hint: Try adding lower bounds to constrain your dependencies, for example: 'package>=2.0.0' instead of just 'package'.

Link: https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors

The installation had already reached: Collecting psutil (from ipykernel==6.27.1->metagpt) Using cached psutil-5.9.8-cp37-abi3-win_amd64.whl.metadata (22 kB) Collecting ordered-set<5.0.0,>=4.0.0 (from agentops->metagpt) Using cached ordered-set-4.0.2.tar.gz (10 kB) Preparing metadata (setup.py) ... done

but there seems to be an error installing. Can anyone help? Thank you

You can prioritise installing the package that reported the error and then proceed to installing all packages, which may happen more than once, but you can just cycle through the packages each time, as this will use the cache.

Collecting packaging (from ipykernel==6.27.1->metagpt==0.8.1)
  Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
error: resolution-too-deep

× Dependency resolution exceeded maximum depth
╰─> Pip cannot resolve the current dependencies as the dependency graph is too complex for pip to solve efficiently.

hint: Try adding lower bounds to constrain your dependencies, for example: 'package>=2.0.0' instead of just 'package'. 

Link: https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors
(python) [root@metagptx-arm-build MetaGPT]# pip install --upgrade pip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/, https://mirrors.aliyun.com/pypi/simple/, https://pypi.org/simple
Requirement already satisfied: pip in /data/miniconda/envs/python/lib/python3.11/site-packages (25.1)
Collecting pip
  Downloading pip-25.1.1-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-25.1.1-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 2.9 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 25.1
    Uninstalling pip-25.1:
      Successfully uninstalled pip-25.1
Successfully installed pip-25.1.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(python) [root@metagptx-arm-build MetaGPT]# pip install packaging==24.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/, https://mirrors.aliyun.com/pypi/simple/, https://pypi.org/simple
Collecting packaging==24.1
  Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Downloading packaging-24.1-py3-none-any.whl (53 kB)
Installing collected packages: packaging
Successfully installed packaging-24.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(python) [root@metagptx-arm-build MetaGPT]# pip install --upgrade -e .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/, https://mirrors.aliyun.com/pypi/simple/, https://pypi.org/simple
Obtaining file:///data/MetaGPT
  Preparing metadata (setup.py) ... done
Collecting aiohttp==3.8.6 (from metagpt==0.8.1)
  Using cached aiohttp-3.8.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (7.7 kB)
Collecting channels==4.0.0 (from metagpt==0.8.1)
  Using cached channels-4.0.0-py3-none-any.whl.metadata (1.5 kB)
Collecting faiss_cpu==1.7.4 (from metagpt==0.8.1)
  Using cached faiss_cpu-1.7.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (1.3 kB)
Collecting fire==0.4.0 (from metagpt==0.8.1)
  Using cached fire-0.4.0.tar.gz (87 kB)

@Lynx-1221
Copy link
Author

Hi, thanks for the responses, I later managed to install metagpt using the git clone repo method. I believe this error was faced when I was using a conda environment with python 3.11, and I simply ran pip install metagpt. However, I did run the command on windows as I did not know metagpt had to be ran on linux, so that may have had an effect.

@fgalind1
Copy link

Can you provide us with the metagpt version, python version, and installation commands to help us troubleshoot?

I'm using python 3.11.5 with the most recent pip package

> venv/bin/python3 --version
Python 3.11.5

> venv/bin/python3 -m pip list | grep pip
pip        25.1.1

And I'm running:

venv/bin/python3 -m pip install metagpt==0.8.2

installing 0.8.1 works fine

@limboys
Copy link

limboys commented May 24, 2025

Setting protobuf to not use a fixed version in the 0.8.2 version of requirements.txt may solve the problem

@fgalind1
Copy link

Setting protobuf to not use a fixed version in the 0.8.2 version of requirements.txt may solve the problem

it would be nice if majority of the requirements are a bit more flexible maybe with >= on the same major version rather than every package to have a specific version, otherwise it is almost impossible to install it with other libraries in a single environment

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

3 participants