how can i change the default python?

  • Thread starter =?ISO-8859-9?Q?Koray_Bostanc=FD?=
  • Start date
?

=?ISO-8859-9?Q?Koray_Bostanc=FD?=

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
 
X

Xavier Morel

Koray said:
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.
 
K

koray.bostanci

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,274
Messages
2,571,366
Members
48,052
Latest member
EvaW192252

Latest Threads

Top