install error PEP 668
pip install --upgrade metagpt
error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.
pip install --upgrade metagpt --break-system-packages Defaulting to user installation because normal site-packages is not writeable Collecting metagpt Using cached metagpt-0.8.1-py3-none-any.whl.metadata (15 kB) Collecting aiohttp==3.8.6 (from metagpt) Using cached aiohttp-3.8.6.tar.gz (7.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting channels==4.0.0 (from metagpt) Using cached channels-4.0.0-py3-none-any.whl.metadata (1.5 kB) Collecting faiss-cpu==1.7.4 (from metagpt) Using cached faiss-cpu-1.7.4.tar.gz (57 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting fire==0.4.0 (from metagpt) Using cached fire-0.4.0.tar.gz (87 kB) Preparing metadata (setup.py) ... done Collecting typer==0.9.0 (from metagpt) Using cached typer-0.9.0-py3-none-any.whl.metadata (14 kB) Collecting lancedb==0.4.0 (from metagpt) Using cached lancedb-0.4.0-py3-none-any.whl.metadata (16 kB) Collecting loguru==0.6.0 (from metagpt) Using cached loguru-0.6.0-py3-none-any.whl.metadata (21 kB) Collecting meilisearch==0.21.0 (from metagpt) Using cached meilisearch-0.21.0-py3-none-any.whl.metadata (8.8 kB) Collecting numpy==1.24.3 (from metagpt) Using cached numpy-1.24.3.tar.gz (10.9 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
python3 --version Python 3.12.3
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.
you can try pip install numpy==1.26.0 or Use Python 3.11 instead of 3.12