By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

sudo:python command not found

P: 2
i am trying to run a file name Filename.py on puTTY software which i also created on puTTY using sudo nano Filename.py
on running the code using "sudo python Filename.py"
errors comes up as "sudo: python: command not found"

please help
Jul 1 '17 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 619
Does the user have the right to run sudo (and why do you have to run the program as root)? Also, try using the /complete/path/to/the/file/Filename.py, or ./Filename.py if the shell is in the correct directory (note the dot+slash). And use a shebang line and make the file executable, instead of calling python -- see "Miscellaneous" at https://docs.python.org/2/using/unix.html
Jul 2 '17 #2

P: 2
Worked
Thank you....👍
Jul 2 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.