Python package to read and write various MacOS extended attribute metadata such as tags/keywords and Finder comments from files. Includes CLI tool for reading/writing metadata.
installing dev environment for osxphotos with python 3.11.2 I faced an issue with import xattr which I traced back to a missing file _lib.abi3.so on the site-packages/xattr folder -- after comparing with the Python 3.9 installation.
Copying the file site-packages/xattr/_lib.abi3.so from Python 3.9 to the same folder solves the issue.
But possible there is more to it...
python3.11 -m pip seems to source version 0.9.9 from a location without such file.
Collecting xattr<0.10.0,>=0.9.9
Using cached xattr-0.9.9-py3-none-any.whl
python3.9 -m pip brings it from a different location, specific to MAC OS and maybe because of that it includes the said file.
Collecting xattr<0.10.0,>=0.9.9
Using cached xattr-0.9.9-cp39-cp39-macosx_10_9_x86_64.whl (15 kB)
Error on python 3.11.2
Traceback (most recent call last):
File "/Users/MSP/Documents/GitHub/osxphotos/venv/lib/python3.11/site-packages/xattr/lib.py", line 7, in <module>
from ._lib import lib, ffi
ModuleNotFoundError: No module named 'xattr._lib'
(...)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/MSP/Documents/GitHub/osxphotos/venv/lib/python3.11/site-packages/xattr/lib_build.h'
For your reference...
_lib.abi3.so
on the site-packages/xattr folder -- after comparing with the Python 3.9 installation.site-packages/xattr/_lib.abi3.so
from Python 3.9 to the same folder solves the issue.python3.11 -m pip seems to source version 0.9.9 from a location without such file.
Collecting xattr<0.10.0,>=0.9.9 Using cached xattr-0.9.9-py3-none-any.whl
python3.9 -m pip brings it from a different location, specific to MAC OS and maybe because of that it includes the said file.
Collecting xattr<0.10.0,>=0.9.9 Using cached xattr-0.9.9-cp39-cp39-macosx_10_9_x86_64.whl (15 kB)
Error on python 3.11.2
Originally posted by @oPromessa in https://github.com/RhetTbull/osxphotos/discussions/1044