I am running a Bash script from within my Flask app with os.system: script_to_run='analyse.sh' cmd=f'./{script_to_run}' os.system(cmd) Inside the Bash script a conda environment gets activated with source: source /path/to/miniconda3/bin/activate venv However environment activation fails. On the other hand, environment activation is successful when running the Bash script outside the flask app. What may be the problem? Thank you. Continue reading...