MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

install error PEP 668

Open athuljayaram opened this issue 9 months ago • 2 comments

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.

athuljayaram avatar Mar 23 '25 15:03 athuljayaram

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 main() File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel backend = _build_backend() ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend obj = import_module(mod_path) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1310, in _find_and_load_unlocked File "", line 488, in _call_with_frames_removed File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/tmp/pip-build-env-w7ejv4dm/overlay/local/lib/python3.12/dist-packages/setuptools/init.py", line 16, in import setuptools.version File "/tmp/pip-build-env-w7ejv4dm/overlay/local/lib/python3.12/dist-packages/setuptools/version.py", line 1, in import pkg_resources File "/tmp/pip-build-env-w7ejv4dm/overlay/local/lib/python3.12/dist-packages/pkg_resources/init.py", line 2172, in register_finder(pkgutil.ImpImporter, find_on_path) ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? [end of output]

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.

athuljayaram avatar Mar 23 '25 15:03 athuljayaram

python3 --version Python 3.12.3

athuljayaram avatar Mar 23 '25 15:03 athuljayaram

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 May 01 '25 00:05 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 May 17 '25 00:05 github-actions[bot]

you can try pip install numpy==1.26.0 or Use Python 3.11 instead of 3.12

limboys avatar May 18 '25 13:05 limboys