473,799 Members | 3,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can i change the default python?

Hi all,

When i type python in terminal it runs the python2.3 interpreter, but i
want to use 2.4 and Python2.4 package is already installed.

How can i change the default python in my system? I searched google for
a little but couldn't find.

Using Debian GNU/Linux.
koray
Dec 13 '05 #1
4 2319

Koray Bostanci wrote:
Hi all,

When i type python in terminal it runs the python2.3 interpreter, but i
want to use 2.4 and Python2.4 package is already installed.

How can i change the default python in my system? I searched google for
a little but couldn't find.

Using Debian GNU/Linux.
koray


in
http://groups.google.com/group/comp.lang.python
"Search this Group" for "install multiple versions"

Dec 13 '05 #2
Koray Bostancý wrote:
Hi all,

When i type python in terminal it runs the python2.3 interpreter, but i
want to use 2.4 and Python2.4 package is already installed.

How can i change the default python in my system? I searched google for
a little but couldn't find.

Using Debian GNU/Linux.


koray


"python" is usually merely a link on your "main" python distribution
(it's the same for many other things, gcc for example).

python (and all the python versions) are in /usr/bin for the deb'.

To rebind it, just remove the current link

$ rm /usr/bin/python

then create a new symbolic link to /usr/bin/python2.4

$ ln -s /usr/bin/python2.4 /usr/bin/python

(you may have to use *sudo* to perform these operations BTW)

Voila, you're done, calling python now starts the python2.4 interpreter.
Dec 13 '05 #3
Another thread touched on the dangers of doing this, if other
applications depend on the older version of Python.

http://groups.google.com/group/comp....4b6bdac1d74b89

Dec 13 '05 #4
Thanks for the hint Xavier.
I made the default interpreter ipython.

# rm /usr/bin/python
# ln -s /usr/bin/python2.4-ipython /usr/bin/python

ipython is better i think ..

and another question;
When i type "sudo aptitude install python-jabber" for example, it
brings the python2.3-jabber package. But i want it to bring me the 2.4
package. Of course i am able to use "sudo aptitude install
python2.4-jabber" but i want to know if this situation is normal? Can i
tell aptitude, bring me python2.4-xx when i type python-xx?

And running two version of python should be a problem?

koray

Dec 14 '05 #5

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

Similar topics

1
3402
by: krithika.sridhar | last post by:
Hi, I'm using : python setup.py bdist_rpm to create an rpm package to distribute my python app on linux. When i install the rpm, the files are installed in /usr/share/python/site-packages/..... directory by default.
13
4970
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone please tell me how do i go about it?
9
1964
by: KDawg44 | last post by:
Hi, I am brand new to Python. In learning anything, I find it useful to actually try to write a useful program to try to tackle an actual problem. I have a syslog server and I would like to parse the syslog messages and try to change any ips to resolved hostnames. Unfortunately, I am not getting any matches on my regular expression.
4
11810
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "read" on the serial port, depending on which part of the protocol I've got to. Sometimes a return character is expected within half a second,...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
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
10247
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
10214
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
10023
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
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.