473,395 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

sudo:python command not found

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
2 6819
dwblas
626 Expert 512MB
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
Worked
Thank you....👍
Jul 2 '17 #3

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

Similar topics

0
by: Oliver | last post by:
Hello, (I posted about this a few weeks agao, but got no response. I've tried some more stuff since then...) I’ve written a Visual basic .NET program that need to create a new .DBF file...
10
by: Stropher | last post by:
I just want to call a stored procedure while working with Visual c# 2005 Express Edition and SQL Server Here is my PressButton method and the subsequent method: //pick up the date from the user...
6
by: PAPutzback | last post by:
The process and execute methods want a path to the executable otherwise they kick out a file not found. So how can I execute the following. It works fine from a command window. echo password|...
1
by: Brendan Jurd | last post by:
Hello all, I've discovered that in 7.4.2 PL/pgSQL, the FOUND variable is not at all affected by use of the EXECUTE command, even if the statement you pass to EXECUTE would set FOUND to true when...
14
by: NormD | last post by:
We have a client-server app using Web Services on an IIS machine. The trace below shows that .NET is searching around for some things (e.g., SystemDrawing.DLL and System.Drawing.EXE) and taking a...
8
by: Ivan | last post by:
Hi I am new in DB2, and I have some problems when I try run stored procedures, and others statements. I made one stored procedure very simple, but this show different messages. I have followed...
2
by: johnxhc | last post by:
I am trying to use sos extension but almost half of the sos command do not work, for example 0:027!findtable No export findtable found 0:027!bpmd No export bpmd found 0:027!GCHandleLeaks...
10
by: Justin | last post by:
We have a simple shell script called testsp.sh (located at /home/ userid) Within the shell script, the following command is called: db2 -tvf callsp.sql When the shell script is run in command...
2
by: db2learner | last post by:
Hi, I am new to DB2 and i just started worked on it a couple of days back. I have created basic EMPLOYEE table from control centre which has 2 fields: EmpNo, EmpName. I am trying to write...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.