How do I add python to the PATH...
Python command is in /usr/bin and I have /usr/bin in my $PATH. I want to be able to run
./program.py instead of having to do python program.py What do I need to do? |
Do you have the command directive on the first line of the python script?
#!/usr/bin/env python Have you set the execute bit on the file? chmod +x file.py Cheers |
Yes I have
#!/usr/bin/python Yes I have the execute bit on The program runs if I do sudo python ./program.py But I want to be able to do sudo ./program.py |
All times are GMT -5. The time now is 07:38 PM. |