python 3 not found if called from shell script

Discussion in 'Installation/Configuration' started by muekno, Jun 9, 2025.

  1. muekno

    muekno Active Member HowtoForge Supporter

    looking since hours
    Server DEBIAN 12 with GUIPython3..11 installed tripple checked
    Python 3 in /usr/bin
    python3 fom command line is foud
    python3 path to .py script works as expected
    but
    <code>
    #!/usr/bin/bash
    echo "press ENTER""
    read x
    python3 path to .py script
    </code>
    gives me python3 not found
    No misstyping double checked
    Checked every posible solution found on the net

    I am out of any ideas

    Regards Rainer
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try using /usr/bin/python3 in your shell script instead of python3. If you run such a script, e.g., as a cronjob, the PATH might not be set, so it can not find files unless you specify where they are.
     
  3. muekno

    muekno Active Member HowtoForge Supporter

    same problem line 9: /usr/bin/pyhthon3: No such file or directory
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you maybe run it in a jail and python is not in the jail?
     

Share This Page