I'm starting to work with python and running into an issue where scripts will execute fine in terminal when called with python, py, or python3* but when trying to execute directly through the web or via cron with full paths, it constantly produces an error saying;
/usr/local/bin/python3.8: No such file or directory
/usr/bin/python3: No such file or directory
/usr/bin/python: No such file or directory
Below are the results when running various commands
which python
/usr/bin/python
which python2
/usr/bin/python2
which python3
/usr/bin/python3
which python3.8
/usr/local/bin/python3.8
# ls /bin/ | grep python
abrt-action-analyze-python
python
python2
python2.7
python2.7-config
python2-config
python3
python3.6
python3.6m
python-config
# echo "$PATH" | tr ':' '\n'
/root/.yarn/bin
/root/.config/yarn/global/node_modules/.bin
/usr/local/cpanel/3rdparty/lib/path-bin
/usr/local/cpanel/3rdparty/lib/path-bin
/usr/lib64/qt-3.3/bin
/usr/local/cpanel/3rdparty/lib/path-bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/opt/cpanel/composer/bin
/root/bin
/usr/local/bin
#whereis python
python:
/usr/bin/python3.6
/usr/bin/python2.7
/usr/bin/python3.6m
/usr/bin/python2.7-config
/usr/bin/python
/usr/lib/python3.6
/usr/lib/python2.7
/usr/lib64/python3.6
/usr/lib64/python2.7
/etc/python /usr/local/bin/python3.8
/usr/local/bin/python3.8-config
/usr/local/lib/python3.6
/usr/local/lib/python3.8
/usr/include/python2.7
/usr/include/python3.6m
/usr/share/man/man1/python.1.gz
whereis python3
python3:
/usr/bin/python3.6
/usr/bin/python3.6m
/usr/bin/python3
/usr/lib/python3.6
/usr/lib64/python3.6
/usr/local/bin/python3.8
/usr/local/bin/python3
/usr/local/bin/python3.8-config
/usr/local/lib/python3.6
/usr/local/lib/python3.8
/usr/include/python3.6m
/usr/share/man/man1/python3.1.gz
Any advice on what to check on?