473,387 Members | 1,464 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,387 software developers and data experts.

python Noob - basic setup question / problem

Running SUSE 10.1 on an AMD64. When I try and run a python program I get
the following error:

/usr/bin/python2: bad interpreter: No such file or directory

"which python" gives me "/usr/local/bin/python"

"which python2.4" gives me "/usr/local/bin/python2.4"

But /usr/bin/python is symlinked to python2.4 "python -python2.4"

"which python2" and nothing comes up.

Basically I have no idea what's going on... help please!

Thanks,
SETH
Dec 4 '06 #1
2 2196
Lilavivat a écrit :
Running SUSE 10.1 on an AMD64. When I try and run a python program I get
the following error:

/usr/bin/python2: bad interpreter: No such file or directory

"which python" gives me "/usr/local/bin/python"

"which python2.4" gives me "/usr/local/bin/python2.4"

But /usr/bin/python is symlinked to python2.4 "python -python2.4"

"which python2" and nothing comes up.

Basically I have no idea what's going on... help please!

Thanks,
SETH
Fault of the Python program : it hardcodes that the Python interpreter
is /usr/bin/python2

Check the first line of the executable ( I bet it is a simple text file
so go away and edit it with emacs/vim/joe/ed ... ). It should be ( with
maybe a few spaces here and there ) :
#!/usr/bin/python2

replace it with :
#!/usr/bin/python
Dec 4 '06 #2
Lilavivat wrote:
/usr/bin/python2: bad interpreter: No such file or directory

"which python" gives me "/usr/local/bin/python"

"which python2.4" gives me "/usr/local/bin/python2.4"

But /usr/bin/python is symlinked to python2.4 "python ->
python2.4"
Try to understand what "which" does. It says which file it calls if
you input the parameter into the shell. So if this happens

$ which python
/usr/local/bin/python

there's no point looking at /usr/bin/python.

What does "ls -l /usr/local/bin/python" say? I bet it's a dangling
symlink.

Regards,
Björn

--
BOFH excuse #255:

Standing room only on the bus.

Dec 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: BOOGIEMAN | last post by:
Well that's it, how do I make Windows Application with Python ??? Is there simple way that works 100% ? How can I rework visual design done in VS 2003 to use it for my python program ?
6
by: Engineer | last post by:
I'm looking for a Python interpreter written in BASIC, preferably Visual Basic, and one written in VBA would be best of all. An alternative would be a Python-2-Basic compiler. Unfortunately I...
3
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit >...
9
by: Dieter Vanderelst | last post by:
Dear all, I'm currently comparing Python versus Perl to use in a project that involved a lot of text processing. I'm trying to determine what the most efficient language would be for our...
9
by: Jack | last post by:
Installing a Python package is easy, most of time just "Setup.py install" However, setup.py doesn't seem to support an uninstall command. If I want to delete a package that I do not use any more,...
32
by: siggi | last post by:
@Ben Sizer Hi Ben, in January I received your message re Pygame and Python 2.5: As a Python (and programming ) newbie allow me a - certainly naive - question:
69
by: notbob | last post by:
I'm not posting this just to initiate some religious flame war, though it's the perfect subject to do so. No, I actaully want some serious advice about these two languages and since I think usenet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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,...

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.