Bundled pyobjc import error
Environment:
- macOS Monterey 12.4
- fr.imag.iihm.blanch.osx-presentation 3.1.0
Issue: Following the documented steps, I got an import error using the bundled pyobjc:
Traceback (most recent call last):
File "/usr/local/bin/presentation.py", line 168, in <module>
from objc import setVerbose
File "/Applications/Présentation.app/Contents/MacOS/../Resources/packages/objc/__init__.py", line 6, in <module>
from . import _objc
ImportError: cannot import name '_objc' from 'objc' (/Applications/Présentation.app/Contents/MacOS/../Resources/packages/objc/__init__.py)
Commenting out the following lines and using pip installed pyobjc fixed the problem:
# using bundled pyobjc
#for path in [
# ('..', '..', '..', 'packages',),
# ('packages',),
# ('..', 'Resources', 'packages'),
#]:
# sys.path.insert(0, os.path.join(
# os.path.dirname(os.path.realpath(__file__)), *path))