A few days ago, my scheduled tasks were running fine without any issues.
However, starting from yesterday, my scheduled tasks started failing with the following error message:
/bin/bash: python: command not found
2025-02-25 11:01:09 -- Completed task, took 53.18 seconds, return code was 127.
/bin/bash: python: command not found
2025-02-25 11:01:09 -- Completed task, took 53.18 seconds, return code was 127.
Commands I have tried:
I have attempted the following commands for my scheduled task:
/usr/local/bin/python3.10 /home/kai9527/mysite/daily_gen_disposal_3.py
python3.10 /home/kai9527/mysite/daily_gen_disposal_3.py
However, all of them resulted in the same error.
Troubleshooting Steps I Have Taken:
I have reviewed similar issues in these forum posts:
https://www.pythonanywhere.com/forums/topic/32138/
https://www.pythonanywhere.com/forums/topic/30597/
I have deleted .bashrc, .profile, and .bash_profile, then restarted my Bash console.
Unfortunately, the problem still persists.
Possible Cause? Recent Changes to My Environment
One change I made to my environment today was installing the ta and TA-Lib libraries.
As part of that process, I ran the following commands:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
export CFLAGS="-I/usr/local/include"
export LDFLAGS="-L/usr/local/lib"
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
echo 'export CFLAGS="-I/usr/local/include"' >> ~/.bashrc
echo 'export LDFLAGS="-L/usr/local/lib"' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/lib
echo 'export LD_LIBRARY_PATH=/usr/local/lib' > ~/.bashrc
source ~/.bashrc
I am not sure if this caused any issues, but as mentioned earlier, I deleted my .bashrc file and restarted my Bash console afterward.
I feel completely lost now... Please help!