Warning: This is a short tech article. To my usual readers that come here to read my cute daddy-daughter stories, please feel free to skip this one.
If you are working with hadoop streaming with python and see the following error in your logs:
Caused by: java.io.IOException: Cannot run program "my_mapper.py": error=2, No such file or directory
What you should do is check the shebang at the top of your python script. And make sure that the python executable is located in the same location on EVERY node of your cluster.
So, if your shebang is:
Verify that /opt/python/bin/python is located exists on every node. Otherwise, when you try to run your hadoop streaming job, you’ll receive the error from above, when one of the nodes tries to run the python script.
Let me know in the comments below if this helped you. Thanks.