X Tutup
The Wayback Machine - https://web.archive.org/web/20230225021135/https://github.com/python/cpython/issues/102134
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

error: externally-managed-environment #102134

Closed
krishnaTORQUE opened this issue Feb 22, 2023 · 3 comments
Closed

error: externally-managed-environment #102134

krishnaTORQUE opened this issue Feb 22, 2023 · 3 comments

Comments

@krishnaTORQUE
Copy link

Crash & Error

krishna@torque:~$ python3 -m pip install pip
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.11/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.

Your environment

  • CPython versions tested on: Python 3.11.2
  • Operating system and architecture: Debian 11, Gnome 42, x86_64

It was working until today its howing this error. sell & setuptools are installed.
I am just trying to install or update python module & for every module, its showing this error.

@krishnaTORQUE krishnaTORQUE added the type-crash A hard crash of the interpreter, possibly with a core dump label Feb 22, 2023
@JelleZijlstra JelleZijlstra removed the type-crash A hard crash of the interpreter, possibly with a core dump label Feb 22, 2023
@JelleZijlstra
Copy link
Member

This looks like Debian patched something (either pip or CPython itself) to nudge you towards using virtual environments. If that doesn't work for you, please report it to Debian.

@kkl90
Copy link

kkl90 commented Feb 24, 2023

I have same thing after I installed some packages on kali. I guess that python, and so on pip got updated. The virtual env. does work, and I can install modules, but, the python scripts does not detect any module, and gives the: "error: no module named [module]".

@Ghost1292
Copy link

this works for me , it says at the end of the error message --break-system-package.

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

4 participants
X Tutup