I have a shell script action that has the following command:
python /Users/my_name/Desktop/webbot/do_something.py
but I get the following error:
Traceback (most recent call last): File "/Users/my_name/Desktop/webbot/do_something.py", line 1, in <module> from webbot import Browser ImportError: No module named webbot
I've ran this python script manually and it works fine, but in Automator I keep hitting this error. Both pip and python versions are 3.6.
Edit:
The python script
The shell script + traceback of error message
I have checked where pip installs my packages and webbot is with all the other ones. I tried importing other packages in the python script and running it in Automator and packages like matplotlib work fine.
Turns out that Automator doesn't use python 3.6 by default and therefore it wasn't able to find the modules pip installed in the 3.6 folder. Following this link's answer Specify which version of Python runs in Automator? it shows how you specify to Automator which python version to use before then running the python script.