java.io.IOException: Cannot run program "python": error=2, No such file or directory

Hi All,

I am running, multiple pyspark unit test cases as a part of the CI/CD pipeline and most of them are running just fine except 7 test cases which are throwing the above-mentioned exception. And these 7 test cases along with other test cases are running fine when I run them locally.

I have been working on it for a couple of days and have tried a lot of solutions, like setting up the PYTHONPATH, PYSPARK_PYTHON and even JAVA version but nothing seems to be working.

Any help will be a savior.