Why is 'xattr' not working?
The file that is executed when you run the command xattr is /usr/bin/xattr which is a python script that works out what version of python you have and then executes /usr/bin/xattr-2.7 for python 2.7. This script is also python and includes a import xattr to import the python module xattr from the Apple installed python libraries