Can't import objc package with python without sudo permissions.
Tried reinstalling python and mac-os but it didn't solve the problem. Whenever I try to import objc module it raises an error. Also tried activating the virtual environment and trying it there, but I came across the same issue. The error disappears when I try the same but with root access.
>python3 -c 'import objc'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/__init__.py", line 6, in <module>
from . import _objc
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so, 2): Symbol not found: _FSPathMakeRef
Referenced from: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_objc.cpython-310-darwin.so
More info is here: https://stackoverflow.com/questions/72367702/import-error-symbol-not-found-fspathmakeref