2

Im gettint an error if I try to update my packages with yay -Syu or sudo pacman -Syu

(270/270) checking for file conflicts                                                                                          [############################################################################] 100%
error: failed to commit transaction (conflicting files)
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/cli/__pycache__/main.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/cli/main.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/collector.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/collector.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/index/package_finder.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/__pycache__/scheme.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/scheme.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/models/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/__pycache__/download.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/__pycache__/utils.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/download.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/network/utils.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/metadata.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/metadata_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/build/wheel_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__init__.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/legacy.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/editable_legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/legacy.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/distutils_args.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/pkg_resources.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-38.pyc exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/distutils_args.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/pkg_resources.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/utils/wheel.py exists in filesystem
python-pip: /usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py exists in filesystem
Errors occurred, no packages were upgraded.

I've also tried to overwrite option as it is recommended in many sources:

sudo pacman -S python-pip --overwrite /usr/lib/python3.8/site-packages/pip/_internal/*

and even with: sudo pacman -S python-pip --overwrite *

But then I get the following error message:

error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/cache.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/cache.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/cli
warning: '/usr/lib/python3.8/site-packages/pip/_internal/cli' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/commands
warning: '/usr/lib/python3.8/site-packages/pip/_internal/commands' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/configuration.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/configuration.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/distributions
warning: '/usr/lib/python3.8/site-packages/pip/_internal/distributions' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/exceptions.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/exceptions.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/index
warning: '/usr/lib/python3.8/site-packages/pip/_internal/index' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/__init__.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/__init__.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/locations.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/locations.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/main.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/main.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/models
warning: '/usr/lib/python3.8/site-packages/pip/_internal/models' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/network
warning: '/usr/lib/python3.8/site-packages/pip/_internal/network' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/operations
warning: '/usr/lib/python3.8/site-packages/pip/_internal/operations' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/pep425tags.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/pep425tags.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/__pycache__
warning: '/usr/lib/python3.8/site-packages/pip/_internal/__pycache__' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/pyproject.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/pyproject.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/req
warning: '/usr/lib/python3.8/site-packages/pip/_internal/req' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/utils
warning: '/usr/lib/python3.8/site-packages/pip/_internal/utils' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/vcs
warning: '/usr/lib/python3.8/site-packages/pip/_internal/vcs' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: /usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py
warning: '/usr/lib/python3.8/site-packages/pip/_internal/wheel_builder.py' is a file, did you mean -U/--upgrade instead of -S/--sync?

Can someone please explain to me how to fix that. The only thing I know is that I once startet a update that was apruptly canceled because my laptop battery went low.

1 Answer 1

4

In all sources I have found, the command for overwriting was wrong. You have to write it like that:

sudo pacman -S python-pip --overwrite='/usr/lib/python3.8/site-packages/*'

Please note the quotes and the equal sign!

At this point I want to thank SysGhost from Manjaro IRC Chanel who showed me the solution of the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .