MacOS – Why would a python3 script not find a module when run in Automator

automatormacospythonscript

I am trying to automatically run a python script using automator. This script
python3 ~/Desktop/python/gmaps.py
works fine in terminal but not when I try to run it through Automator , I get a "module pyperclip cannot be found", even though it is found fine when running from terminal.

I can not figure out what would cause the path to be different. Is there a guide to command line plus Automator ?

Best Answer

Solved: I'm not sure why it worked, but running pip3 install pyperclip in the automator window installed it in the correct location for it to be used.