Failed to commit transaction on the latest update

Here's the full error log:

(109/109) checking for file conflicts                   [##############################] 100%
error: failed to commit transaction (conflicting files)
python-attrs: /usr/lib/python3.7/site-packages/attr/__init__.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__init__.pyi exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/__init__.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/_compat.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/_config.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/_funcs.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/_make.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/converters.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/exceptions.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/filters.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/__pycache__/validators.cpython-37.pyc exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/_compat.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/_config.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/_funcs.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/_make.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/converters.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/converters.pyi exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/exceptions.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/exceptions.pyi exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/filters.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/filters.pyi exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/py.typed exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/validators.py exists in filesystem
python-attrs: /usr/lib/python3.7/site-packages/attr/validators.pyi exists in filesystem
Errors occurred, no packages were upgraded.

Here's the output of pip list:

Package              Version 
-------------------- --------
appdirs              1.4.3   
asn1crypto           0.24.0  
attrs                19.1.0  
Automat              0.7.0   
backcall             0.1.0   
btrfsutil            1.1.1   
CacheControl         0.12.5  
cffi                 1.12.3  
chardet              3.0.4   
colorama             0.4.1   
constantly           15.1.0  
cryptography         2.7     
cssselect            1.0.3   
cupshelpers          1.0     
Cython               0.29.11 
decorator            4.4.0   
distlib              0.2.9   
distro               1.4.0   
docopt               0.6.2   
html5lib             1.0.1   
hyperlink            19.0.0  
idna                 2.8     
incremental          17.5.0  
ipython              7.6.1   
ipython-genutils     0.1.0   
Jade-Application-Kit 2.0.9   
jedi                 0.13.3  
keyutils             0.5     
lockfile             0.12.2  
louis                3.10.0  
lxml                 4.4.0   
msgpack              0.6.1   
npyscreen            4.10.5  
numpy                1.16.4  
packaging            19.0    
pacman-mirrors       4.14.2  
parsel               1.5.1   
parso                0.5.1   
pep517               0.5.0   
pexpect              4.7.0   
pickleshare          0.7.5   
Pillow               6.1.0   
pip                  19.0.3  
progress             1.5     
prompt-toolkit       2.0.9   
ptyprocess           0.6.0   
pwquality            1.4.0   
pyasn1               0.4.5   
pyasn1-modules       0.2.5   
pycairo              1.18.1  
pycparser            2.19    
pycups               1.9.74  
pycurl               7.43.0.3
PyDispatcher         2.0.5   
Pygments             2.4.2   
PyGObject            3.32.2  
PyHamcrest           1.9.0   
pyOpenSSL            19.0.0  
pyparsing            2.4.0   
PyQt5                5.13.0  
PyQt5-sip            4.19.18 
pysmbc               1.0.16  
pytoml               0.1.21  
PyYAML               5.1.1   
queuelib             1.5.0   
reportlab            3.5.23  
requests             2.22.0  
retrying             1.3.3   
Scrapy               1.7.2   
sent2vec             0.0.0   
service-identity     18.1.0  
setuptools           41.0.1  
simplegeneric        0.8.1   
six                  1.12.0  
team                 1.0     
traitlets            4.3.2   
Twisted              19.2.1  
udiskie              1.7.7   
urllib3              1.25.3  
w3lib                1.20.0  
wcwidth              0.1.7   
webencodings         0.5.1   
zope.interface       4.6.0

Here's the output of pacman -Qo /usr/lib/python3.7/site-packages/attr/

error: No package owns /usr/lib/python3.7/site-packages/attr

I think it's because I installed attr via pip but I'm not sure and don't want to break my system!

That's correct.

So you can ether remove the attr package via pip, or overwrite the offending files via pacman.
First option is the best.

3 Likes

Solved!
Thanks!

What made you think of the attrs package when all the error messages are about python-attrs?

Hello,

I tried to uninstall attr via pip and I get the following notification:

pip uninstall attr
Uninstalling attr-0.3.1:
  Would remove:
    /home/XYZ/anaconda3/lib/python3.7/site-packages/attr-0.3.1.dist-info/*
    /home/XYZ/anaconda3/lib/python3.7/site-packages/attr.py
    /home/XYZ/anaconda3/lib/python3.7/site-packages/dry_attr.py
Proceed (y/n)? y
  Successfully uninstalled attr-0.3.1

When I re-run the update, pacman -Syu, I get the same error and when I look in the files, the files or the /attr/ directory is still there. I noticed that pip gives the files attr.py instead of just attr, which would be uninstalled. When searching in the file /site-packages/ I don't find those file with the .py-ending, only without. When I re-run the pip uninstall-command, it says:

pip uninstall attr
Skipping attr as it is not installed.

Obviously, it uninstalled some attr-package, but it looks to me as if it was some other package and I don't know which.

Thanks in advance.

This solved the problem:

You removed attr from an anaconda environment, not from the system.

It honestly amazes me how much of a mess can be made with Python installations...

So when I removed it only from anaconda (which I uninstalled in the meanwhile, no damage should be expected in the system, right? Sorry, I am not an expert on those things, that's why I use the forum.

Conda environments are entirely isolated from the system.

Using a Conda environment (or other virtual environment) is generally a smart thing to do if you do development using Python.

However, if you don't know the delineations between pacman, pip, and conda things can get messy.

Thanks for the info. I'll try to figure them out.

Forum kindly sponsored by Bytemark