Automtor Run Shell Script "command not found"

I need to automate the running of few python scripts through Jupyter Notebook. I've got everything installed correctly and can open Jupyter Notebook by simply running the command 'jupyter notebook' in the Terminal. However, when I run this command in the Shell Script in Automator I get an error that the 'jupyter' command isn't recognized.


How do I go about correcting this error?

Posted on May 19, 2021 8:36 AM

Reply
Question marked as Top-ranking reply

Posted on May 19, 2021 8:41 AM

The Automator PATH looks like this

PATH=/usr/bin:/bin:/usr/sbin:/sbin


If your command is not in one of those directories, then you need to either specify a new PATH as part of your Automator shell script

export PATH="${PATH}:/additional/dirs/such/as:/usr/local/bin:/opt/local/bin"


Or specify the full path to the command

/usr/local/bin/fred -a -b -c arg1 arg2 ...
/opt/local/bin/george -x -y -z arg1 arg2 ...


4 replies
Question marked as Top-ranking reply

May 19, 2021 8:41 AM in response to benijah

The Automator PATH looks like this

PATH=/usr/bin:/bin:/usr/sbin:/sbin


If your command is not in one of those directories, then you need to either specify a new PATH as part of your Automator shell script

export PATH="${PATH}:/additional/dirs/such/as:/usr/local/bin:/opt/local/bin"


Or specify the full path to the command

/usr/local/bin/fred -a -b -c arg1 arg2 ...
/opt/local/bin/george -x -y -z arg1 arg2 ...


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automtor Run Shell Script "command not found"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.