LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-10-2011, 12:38 AM   #1
vvenomouss
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Rep: Reputation: Disabled
Removing/switching python versions


I am on CentOS 5, my server already has python 2.4 installed. I installed Activestate Python 2.7, the installation was successful and all went good.

But even now python -V would display 2.4

How do I remove 2.4 or how can I switch between the versions? Or any other suggestions?
 
Old 11-10-2011, 01:15 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hello,

You've marked your thread as solved. Could you please let the community know how you fixed your problem so that others in a similar situation can see if it works for them too? I'm assuming you found update-alternatives as a solution. Thanks in advance. Off the Zero Reply List.

Kind regards,

Eric
 
Old 11-10-2011, 01:25 AM   #3
vvenomouss
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Solution:

I added the new python installation to that path overwriting the previous version, as such the new version became default.

export PATH=/usr/bin/Python2.7/bin:$PATH

Thanks
 
Old 11-10-2011, 01:30 AM   #4
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hello,

Thank you for providing the info. But, what about the programs that depend on the previous version of Python? Wouldn't it be 'cleaner' to install both versions next to one another and use for example update-alternatives? Or use python2.7 as a link to the newer version in your programs? At least you know that when strange things happen on your server where to start looking .

Kind regards,

Eric
 
Old 11-10-2011, 02:24 AM   #5
vvenomouss
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yeah you are right, I had also done:

alias python='/usr/bin/Python2.7/bin/python'

So applications should run smoothly. Are you talking about backward compatibility? Apps that can't run on 2.7?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching between installed KDE versions ManuPeng Linux - Desktop 2 06-09-2007 11:54 AM
removing 1 of 2 linux versions stan88 Linux - Newbie 1 04-04-2007 08:28 PM
removing old kernel versions ktt76 Fedora 3 12-01-2005 03:48 AM
switching between gcc versions DrAMac Debian 2 08-30-2005 06:21 PM
Switching versions of OpenSSH elluzion Linux - Software 1 08-27-2002 03:57 PM


All times are GMT -5. The time now is 06:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration