I am not used to install python modules with pip. Instead I prefer to use a docker container.
Anyway I have got an error message installing calibre and the reason is that if I try to install python-regex I am getting the following error message:
pacman -S python-regex
resolving dependencies...
looking for conflicting packages...
Packages (1) python-regex-2023.10.3-1
Total Installed Size: 2,39 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [##############################################################################################] 100%
(1/1) checking package integrity [##############################################################################################] 100%
(1/1) loading package files [##############################################################################################] 100%
(1/1) checking for file conflicts [##############################################################################################] 100%
error: failed to commit transaction (conflicting files)
python-regex: /usr/lib/python3.11/site-packages/regex/__init__.py exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/__pycache__/__init__.cpython-311.pyc exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/__pycache__/_regex_core.cpython-311.pyc exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/__pycache__/regex.cpython-311.pyc exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/__pycache__/test_regex.cpython-311.pyc exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/_regex.cpython-311-x86_64-linux-gnu.so exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/_regex_core.py exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/regex.py exists in filesystem
python-regex: /usr/lib/python3.11/site-packages/regex/test_regex.py exists in filesystem
Errors occurred, no packages were upgraded.
if I try to list, the package is there:
pip3 list | grep -i regex
regex 2023.6.3
But if I try to remove, I am getting this:
pip3 uninstall regex
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
python-xyz', where xyz is the package you are trying to
install.
If you wish to install a non-Arch-packaged Python package,
create a virtual environment using 'python -m venv path/to/venv'.
Then use path/to/venv/bin/python and path/to/venv/bin/pip.
If you wish to install a non-Arch packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have python-pipx
installed via pacman.
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.