![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Programming Talk This forum is for all programming questions. The questions do not have to be directly related to Ubuntu and any programming language is allowed. |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Nov 2006
Beans: 41
Ubuntu 9.04 Jaunty Jackalope
|
Setting Python2.5 to Run From The Command Line
I have installed the python2.5 package on my system and I would like to know how to configure my system so that it will run the python2.5 interpreter when I type 'python' on the command line. Currently it seems to be set to run Python2.4 instead when I type 'python'. I noticed that there are python2.4 and python2.5 executables in /usr/bin and there is also a file named python which is a link to an executable. When I look under properties I can see that it is linked to python2.4 so I can see why typing python from the command line runs python2.4 and not python2.5 but I don't know how to change this. Could someone please tell me how to change the target of the python file?
Thanks |
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() Join Date: Nov 2005
Beans: 51
Ubuntu 6.10 Edgy
|
Re: Setting Python2.5 to Run From The Command Line
Code:
sudo rm /usr/bin/python sudo ln -s /usr/bin/python2.5 /usr/bin/python |
|
|
|
|
|
#3 |
|
Ubuntu Extra Shot
![]() Join Date: Oct 2004
Location: Germany, Old Europe
Beans: 379
Kubuntu Jaunty Jackalope (testing)
|
Re: Setting Python2.5 to Run From The Command Line
|
|
|
|
|
|
#4 |
|
5 Cups of Ubuntu
![]() Join Date: Nov 2006
Beans: 41
Ubuntu 9.04 Jaunty Jackalope
|
Re: Setting Python2.5 to Run From The Command Line
Ok. Thanks for your help. It works now.
|
|
|
|
|
|
#5 |
|
Way Too Much Ubuntu
![]() Join Date: Feb 2005
Location: Maine, USA
Beans: 290
|
Re: Setting Python2.5 to Run From The Command Line
|
|
|
|
|
|
#6 |
|
Tall Cafè Ubuntu
![]() Join Date: Oct 2006
Beans: 2,678
Ubuntu 7.10 Gutsy Gibbon
|
Re: Setting Python2.5 to Run From The Command Line
Same here, I have 2.4 and 2.5 and it told me there were no alternatives either. I don't really mind as I rarely use python in the terminal, just thought I would point that out.
|
|
|
|
|
|
#7 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Sep 2006
My beans are hidden!
|
Re: Setting Python2.5 to Run From The Command Line
cyberslayer,
If you want to set it up for just one user, you can set an alias for it in ~/.bashrc: Code:
alias python='/usr/bin/python2.5' |
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() |
I think I've figured out how to get python2.5 "fully functional. Using the update-alternatives "hint" from an earlier response, I did a little research, and learned that "update-alternatives" for python MUST be configured (which it apparently is not, out of the box).
Like others above mentioned, I too experienced "update-alternatives --config python" returned "no alternatives". I then did the following (after su root; sudo before each command may work too): Code:
update-alternatives --install /usr/lib/python python /usr/lib/python2.4 10 update-alternatives --install /usr/lib/python python /usr/lib/python2.5 1 I now get the list of alternatives when I issue the Code:
update-alternatives --config python, or update-alternatives --set python /usr/lib/python2.5 Any comments? |
|
|
|
|
|
#9 | |
|
First Cup of Ubuntu
![]() Join Date: Jul 2006
Beans: 12
|
Re: Setting Python2.5 to Run From The Command Line
Quote:
Did you mean to say this instead? Code:
update-alternatives --install /usr/bin/python python /usr/lib/python2.4 10 update-alternatives --install /usr/bin/python python /usr/lib/python2.5 1 -Tyler |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|