How Do You Solve “env: ‘python’: Permission denied”?

Problem scenario
You are running a script and you receive env: "‘python’: Permission denied"

Run this: sudo ls -lhd $(which python)

Look at the permissions, file owner and group associated with the results. Consider the user that brings about the original error. You may need to change the permissions of the file.

Is the file link pointing to a directory? If a file such as /usr/bin/python is pointing to a Python directory, this could be the problem.

Leave a comment

Your email address will not be published. Required fields are marked *