I have following bash script:
export MYCONFIG_CONFIG=TEST
/home/bmwant/projects/test/venv/bin/python3 /home/bmwant/projects/test/script.py
My python script needs environment variable which I have set, but running this script as
bash run_python.sh
shows an error
/home/bmwant/projects/test/venv/bin/python3: can't open file 'home/bmwant/projects/tes': [Errno 2] No such file or directory
What is wrong? I have set script as executable with chmod u+x run_python.sh
So, the problem was in file format. I have created it in Windows and then copy via FileZilla to remote server where I was trying to run it. So just run
and all will work well. Thanks @Horst for the hint.