I wrote a script which sets extended attributes on some files, with the module xattr. I successfully tested it in Ubuntu in python3, but it won't work on my RasperryPi.
I had to change a dozens of little errors, mostly like xattr not knowing its methods.
For example the xattr.set(...) has to be changed to xattr.setattr(...). But I failed at listing them. So I tried the just the basics and get the error:
import xattr
xattr.list('files.py')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'xattr' has no attribute 'list'
I had the idea that maybe python is using the wrong module (for python 2.7 instead of 3?). So I tried to uninstall the 2.7 module but got this:
...$ pip uninstall xattr
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named _internal
But I could successfully uninstall the python3 package. After that the "import xattr" still worked even in python3?