MetaGPT
MetaGPT copied to clipboard
Long Installation Time and Continuous Version Attempt with "pip install metagpt" under Python 3.10.0
Description: I attempted to install the "metagpt" package using "pip install metagpt" under Python 3.10.0. However, the installation process has been running for over 8 hours without completion. Upon inspecting the logs, it seems that the installation is continuously attempting different packages and versions, resulting in the extended duration of the process.
Steps to Reproduce:
Install Python 3.10.0. Run "pip install metagpt" to install the "metagpt" package. Expected Behavior: The installation process should complete in a reasonable amount of time without continuously attempting different packages and versions.
Actual Behavior: The installation process has been running for over 8 hours without completion, and it's continuously attempting different packages and versions.
Screenshots or logs INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking INFO: pip is looking at multiple versions of multidict to determine which version is compatible with other requirements. This could take a while. Collecting multidict<7.0,>=4.5 Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/6.0.4/multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) |████████████████████████████████| 114 kB 6.6 MB/s INFO: pip is looking at multiple versions of networkx to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of mypy-extensions to determine which version is compatible with other requirements. This could take a while. INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/6.0.3/multidict-6.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) |████████████████████████████████| 114 kB 6.2 MB/s Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/6.0.2/multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) |████████████████████████████████| 114 kB 6.4 MB/s Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/6.0.1/multidict-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) |████████████████████████████████| 114 kB 6.7 MB/s Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/6.0.0/multidict-6.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114 kB) |████████████████████████████████| 114 kB 7.0 MB/s Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/5.2.0/multidict-5.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (175 kB) |████████████████████████████████| 175 kB 6.8 MB/s Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/5.1.0/multidict-5.1.0.tar.gz (53 kB) |████████████████████████████████| 53 kB 7.4 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done INFO: pip is looking at multiple versions of multidict to determine which version is compatible with other requirements. This could take a while. Downloading https://maven.tuya-inc.top/repository/pypi-group/packages/multidict/5.0.2/multidict-5.0.2.tar.gz (53 kB) |████████████████████████████████| 53 kB 7.9 MB/s Installing build dependencies ... done
Most of dependencies of metagpt have a specified version.
And multidict
is not a direct dependency of MetaGPT; rather, it should be a dependency of one of MetaGPT's dependencies.
I have tried out Python 3.10 and could not replicate this issue.
Generally this is how I solve the problem, but it's not perfect
Try this:
git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .
And figure out what package makes it stuck. Set the package a stable version in requirements.txt
Try this:
-
Create a new virtual environment to isolate the dependencies for your project. You can use tools like
venv
orconda
to create a virtual environment.For example, using
venv
:python -m venv myenv source myenv/bin/activate
-
Inside the virtual environment, upgrade
pip
to the latest version:pip install --upgrade pip
-
Install the required packages one by one, specifying the compatible versions mentioned in the error message:
pip install websockets~=12.0 pip install tokenizers!=0.11.3,<0.14,>=0.11.1
-
Install the
metagpt
package:pip install metagpt==0.7.6
-
Install the
transformers
package:pip install transformers==4.24.0
-
If you have a
requirements.txt
file, update it with the specific versions of the packages that are compatible with each other.For example:
metagpt==0.7.6 transformers==4.24.0 websockets~=12.0 tokenizers!=0.11.3,<0.14,>=0.11.1
Then, you can install the packages from the
requirements.txt
file using:pip install -r requirements.txt
It's always a good practice to use virtual environments to manage project-specific dependencies and avoid conflicts with other projects or system-wide packages.
Yes, I created the Python 3.10.0 environment using pyenv. I tried again these past few days, patiently waiting until the command finished. It took nearly 13 hours, and in the end, I discovered it was due to the low version of pip (21.2.3). After upgrading pip to version 24.0, it took about 10 minutes for pip install metagpt to succeed.
Thank you all for your help. I believe we can close this issue now.