LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Dragora GNU/Linux-Libre
User Name
Password
Dragora GNU/Linux-Libre This forum is for the discussion of Dragora Linux.

Notices



Reply
 
Search this Thread
Old 05-07-2014, 12:28 PM   #1
elefher
Dragora Contributor
 
Registered: May 2014
Location: Greece - Athens
Distribution: Dragora, Mint
Posts: 12

Rep: Reputation: 3
How do i install two python versions in Dragora?[Tutorial]


How to install two Python versions in Dragora

First of all you need to download the virtualenv. You can do it with these commands:

Code:
$ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
$ tar xvfz virtualenv-X.X.tar.gz
$ cd virtualenv-X.X
$ [sudo] python setup.py install
If you want to find the last version of virtualenv go to virtualenv and find the latest version,then replace the virtualenv-X.X.tar.gz of the first command with the latest version. For instance, if you want to install the version 1.9 then you have to hit the follow command:

Code:
curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.tar.gz
If you think you have installed virtualenv successfully you can hit:

Code:
virtualenv --version
so, if you see the right version (in our example 1.9) then it's ok!

The next step is a “peace of cake” don't worry, download python from this https://www.python.org/ftp/python/ , in our example we downloaded the version 2.7.6. Thus you can only hit the following commands:

Code:
tar -zxvf Python-2.7.6.tar.gz
cd Python-2.7.6
mkdir ~/.localpython
./configure --prefix=/home/<user>/.localpython
make
make install
Perfect, now you have two versions of python in your system.

Attention!! if you hit

Code:
python -V
you will see the previous version of python and this is right. Think again, we just installed the new python in ~/.localpython and not in the default path (/usr/bin). So if you want to enable new python then just hit:

Code:
virtualenv ve -p /home/<user>/.localpython/bin/python2.7
source ve/bin/activate
or

Code:
alias python=/home/<user>/.localpython/bin/python2.7
Again hit:

Code:
python -V
Great!! You have just enabled the python 2.7

Last edited by elefher; 05-07-2014 at 04:10 PM.
 
Old 05-07-2014, 05:00 PM   #2
frusen
Dragora Contributor
 
Registered: May 2014
Location: Sweden
Distribution: Dragora, OpenBSD
Posts: 10

Rep: Reputation: Disabled
Interesting solution!

Another way is to add a package of another version of Python instead of upgrading/downgrading and then change the symbolic link.
 
Old 05-07-2014, 05:46 PM   #3
geodoo
Dragora Contributor
 
Registered: May 2014
Location: Athens, Greece
Distribution: Dragora
Posts: 37

Rep: Reputation: 4
Wink

Quote:
Originally Posted by frusen View Post
Interesting solution!

Another way is to add a package of another version of Python instead of upgrading/downgrading and then change the symbolic link.
Hi frusen!! Nice to see you in here... This is in our wiki too... dragora.org/wiki

We are trying to upgrade Icecat you know... I have version 10... And the newer ones need python > 2.7 to compile... Have you tried it yet? Or, do you know a way to do this? We are on for this...

Last edited by geodoo; 05-07-2014 at 05:51 PM.
 
Old 05-07-2014, 06:59 PM   #4
frusen
Dragora Contributor
 
Registered: May 2014
Location: Sweden
Distribution: Dragora, OpenBSD
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by geodoo View Post
Hi frusen!! Nice to see you in here... This is in our wiki too... dragora.org/wiki

We are trying to upgrade Icecat you know... I have version 10... And the newer ones need python > 2.7 to compile... Have you tried it yet? Or, do you know a way to do this? We are on for this...
Hey!

I've compiled and ran both IceCat version 17.0 and 24.0 on Dragora 2.2. You might find some of the dependencies here. I'm working on setting up a source repository.

I never built a package but I can help out on IRC someday.
 
1 members found this post helpful.
Old 05-08-2014, 09:16 AM   #5
geodoo
Dragora Contributor
 
Registered: May 2014
Location: Athens, Greece
Distribution: Dragora
Posts: 37

Rep: Reputation: 4
Wink

Is it possible to post the compilation process or sth like elefher's tutorial in a new thread? Mark it as elefher did!! Tutorial...

It would be awesome!!!

I mean about Icecat 24.0...
 
Old 05-11-2014, 04:26 PM   #6
frusen
Dragora Contributor
 
Registered: May 2014
Location: Sweden
Distribution: Dragora, OpenBSD
Posts: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by geodoo View Post
Is it possible to post the compilation process or sth like elefher's tutorial in a new thread?
Just how to compile it or how to create a package of it?

Here is a guide about creating packages and here is the script used for creating the version of IceCat that comes with Dragora 2.2.
 
1 members found this post helpful.
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple python versions mahsan3 Linux - Software 16 12-09-2013 09:16 AM
[SOLVED] Python Versions business_kid Slackware 5 10-19-2012 02:45 PM
Different Versions of Python FragInHell Programming 14 05-11-2011 09:26 PM
install latest versions of python, pygtk and glib kosmognov Linux - Software 2 05-12-2006 03:30 PM
different python versions on the same box birras Red Hat 0 11-14-2004 01:51 PM


All times are GMT -5. The time now is 03:21 PM.

Main Menu
Advertisement
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