473,583 Members | 3,140 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 2301

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
3394
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
4950
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
1946
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
11705
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...
0
7896
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...
0
7828
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...
0
8186
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. ...
0
8197
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...
0
6583
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...
1
5704
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5377
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...
0
3821
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...
0
3847
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.