#!/usr/bin/env doesn't work for CGI scripts

When I begin a CGI script with
#!/usr/local/bin/python3
it works fine. But when I begin it with
#!/usr/bin/env python3
I get
500 Internal Server Error
Further investigation shows that the environment variable PATH when running a CGI script is:
/sbin:/bin:/usr/sbin:/usr/bin
When I run /usr/local/bin/xinit, I make sure that /usr/local/bin is in the PATH environment variable. But that doesn't seem to be enough. How do I make
#!/usr/bin/env python3
work?
 
Back
Top