Motioneye error: externally-managed-environment

I am running dietpi leia upgrading to bookworth on RPI3. I would like to uninstall this package but i can’t :

[FAILED] DietPi-Software | pip3 uninstall -y motioneye
[ INFO ] DietPi-Software | Executing alternative command: pip3 uninstall -y motioneye
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.
[FAILED] Alternative command execution | Exited with error
Press any key to return to error handler menu...

what version of DietPi is this?

Can you fill in the troubleshooting template that you have ignored so far?

Required

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=11
G_DIETPI_VERSION_RC=2
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’

echo $G_DISTRO_NAME $G_RASPBIAN
bookworm 0

uname -a
Linux DietPi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

dpkg --print-architecture
armhf

echo $G_HW_MODEL_NAME
RPi 3 Model B (armv7l)

i can’t access motioneye anymore since upgrading rpi to Bookworth. So i want to uninstall it to re-install a fresh version :

# pip3 uninstall -y motioneye 
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.
# pip3 uninstall -y motioneye --break-system-packages
WARNING: Skipping motioneye as it is not installed.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

i installed a new fresh version. Simply missing default passwd !

There is actually no default password. If I am not mistaken, you have to create the initial user yourself during the first login.