Results 1 to 5 of 5
-
01-08-2011, 12:50 AM #1Aspiring Evangelist
- Join Date
- Jan 2007
- Posts
- 360
Python is installed, but not recognized by scripts?
Hello.
Python is installed, but not recognized by scripts?
I have python installed, but none of my scripts recognize it, and says that there is no python installed.
When I do "which python" command in ssh and it tells me that it is installed.
Also I had my server management company look at it, and they told me it is installed and cant do anything else, and dont know why the scripts are not picking it up.
My scripts were working fine with Plesk on old server, and this server I have plesk aswell, but my scripts are not picking up python......
Also, just for more information, LOADAVG is not picking up by scripts aswell as PYTHON. So there is definitely something wrong.
Any help please?
Thanks.
-
01-08-2011, 01:02 AM #2Web Hosting Master
- Join Date
- Apr 2009
- Location
- inside wht
- Posts
- 746
Hello,
So if "which python" is showing python in /usr/local/bin/python or /usr/bin/python , check these binaries are available there
# ls -al /usr/bin/python
# ls -al /usr/local/bin/python
If it is ok edit th first line of your python script as follows
#!/usr/bin/env python
Now try to execute it . If the above one not working replace the first line with the full path to python
#!/usr/local/bin/python
If you are using a self executable script make sure to chmod 755 .24x7 PROACTIVE SERVER MANAGEMENT | OUTSOURCED WEB HOSTING SUPPORT
Sales : sales @ syslint.com | Call us : (+91)9447607799 | Are you looking for DevOps Admins ?
-
01-08-2011, 01:13 AM #3Aspiring Evangelist
- Join Date
- Jan 2007
- Posts
- 360
Its showing as the location as /usr/bin/python
But I have that path in my scripts and still it is saying "Path is not valid"
It is not only 1 script, but 2 of them have the same problems.
-
01-08-2011, 01:36 AM #4Web Hosting Master
- Join Date
- Apr 2009
- Location
- inside wht
- Posts
- 746
try this following ,
# /usr/bin/python scriptname.py ,
what result are you getting.24x7 PROACTIVE SERVER MANAGEMENT | OUTSOURCED WEB HOSTING SUPPORT
Sales : sales @ syslint.com | Call us : (+91)9447607799 | Are you looking for DevOps Admins ?
-
01-08-2011, 02:10 AM #5Aspiring Evangelist
- Join Date
- Jan 2007
- Posts
- 360
Well its not just one .py file, its a script that uses python aswell as many other things in order to run.....
I just did that command, and it looks like the file runs....
Similar Threads
-
How to check if python is installed on my reseller
By tihhc in forum Hosting Security and TechnologyReplies: 9Last Post: 10-11-2010, 12:49 AM -
Need Python and Script installed on my server
By PEAK-Bobby in forum Employment / Job OffersReplies: 4Last Post: 12-03-2009, 03:13 AM -
CGI scripts(Perl/Python) are not able to run on Plesk Windows Server 2003
By freewebspace in forum Hosting Security and TechnologyReplies: 9Last Post: 06-24-2008, 07:58 AM -
Running python scripts
By okok in forum Hosting Security and TechnologyReplies: 7Last Post: 10-12-2004, 01:47 PM -
Anyone need any scripts installed?
By bwb in forum Employment / Job OffersReplies: 2Last Post: 10-18-2003, 03:30 PM