I have installed Py-Appscript on my machine and it can be used with the Python installation at /Library/Frameworks/Python.framework/Versions/Current/bin/python.
I am trying to use this installation of Py-Appscript with an Automator service. To do this, I use the Run Shell Script action and then set the Shell to usr/bin/python (which is my only choice for Python, unfortunately).
The usr/bin/python does not appear to have access to my third-party modules and crashes on the line:
from appscript import *
Is there a way for me to give usr/bin/python access to my third-party modules?
OR
Is there a way to tell Automator to use /Library/Frameworks/Python.framework/Versions/Current/bin/python instead?
I need Automator to run the Python directly from the Run Shell Script action. Any action that calls Python scripts that are external to Automator (via bin/bash, for example) does not perform quickly enough to be useful.
When you install modules, you typically install them per Python instance. So in this case you have installed them for the Python in /Library/Frameworks/Python.framework/Versions/Current/bin/python, and it will then be available only for that Python. /usr/bin/python is then apparently another Python installation (I'm not an OS X expert).
To make it available for the /usr/bin/python installation, install it for /usr/bin/python.
Using Third-Party Modules with Python in an Automator Service