Install from PyPi - errors when trying to run.

#4 · closed · 3 comments

View on GitHub ↗

mattpackwood

Hi, I installed the library from PyPi pip3 install py-applescript When I try to execute code I get: Traceback (most recent call last): File "Phone_Test.py", line 1, in <module> import applescript File "/Users/mattpackwood/Library/Python/3.8/lib/python/site-packages/applescript/__init__.py", line 5, in <module> from Foundation import NSAppleScript, NSAppleEventDescriptor, NSURL, \ ModuleNotFoundError: No module named 'Foundation' Any suggestions of a step I am missing?

Comments

RhetTbull

Do you have PyObjC installed? Maybe try pip install pyobjc

mattpackwood

That is what I was missing, many thanks!!!

rdhyee

Thanks @RhetTbull