473,769 Members | 5,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2210
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
4526
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
2408
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 have to develop some special purpose code in an organization where my only development environment is Microsoft Office Visual Basic for Applications. The security 'droids have decided that since the MS Office Suite is a "standard" application...
3
2835
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 > http://mail.python.org/mailman/listinfo/python-list > or, via email, send a message with subject or body > 'help' to
9
4521
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 purposes. I have to admit that, although I'm very familiar with Python, I'm complete Perl noob (and I hope to stay one) which is reflected in my questions. I know that the web offers a lot of resources on Python/Perl differences. But I couldn't find a...
9
3761
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, should I just manually delete the corresponding sub directory under Lib\site-packages?
32
2869
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
2925
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 is the best arena to find it, here ya' go. So, here's my delimna: I want to start a blog. Yeah, who doesn't. Yet, I want learn the guts of it instead of just booting up some wordwank or whatever. I started to learn python, but heard php was...
0
10210
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10039
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9860
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.