Is there a Python Version Manager?

T

TerryP

Having STFW and come up empty, I'm wondering if anyone knows if there
is an analogue to the Ruby Version Manager <http://
rvm.beginrescueend.com/> in the Python world? rvm is essentially a
tool that can install several Ruby implementations side by side and
easily hot swap them in your shell session. Check a few pages of their
website and you will get the idea. In the python world, the closest I
have seen to rvm, are tools that just archive a (C)Python distribution
around your project. Not what I need.


Why I ask, is after years of using systems that package *modern*
versions of Python, I'm now stuck with a work station running 2.4 as
latest and greatest! Personally I draw the line at supporting "2.6,
3.1, and otherwise YMMV" -- that means building and maintaining my own
builds outside the OS'es package management is going to become a
reality real soon, not to mention a pain. So something like rvm but
for Python, would be a real life saver in my near future.



and if writing a Python analogue to rvm is necessary, would anyone be
interested in helping with such a project?
 
K

Kushal Kumaran

Having STFW and come up empty, I'm wondering if anyone knows if there
is an analogue to the Ruby Version Manager <http://
rvm.beginrescueend.com/> in the Python world? rvm is essentially a
tool that can install several Ruby implementations side by side and
easily hot swap them in your shell session. Check a few pages of their
website and you will get the idea. In the python world, the closest I
have seen to rvm, are tools that just archive a (C)Python distribution
around your project. Not what I need.

Is virtualenv what you need?

http://pypi.python.org/pypi/virtualenv
 
T

TerryP



Not quite. It basically amounts to a UNIX version of xcopy'ing an
existing Python installation.

... install Python X.Y by any means
python virtualenv.py -p=X.Y whereToStoreFiles # clone existing
Python X.Y install
python virtualenv.py --relocatable whereToStoreFiles # make xcopy/
tar friendly
. whereToStoreFiles/bin/activate
python file.py args # run using whereToStoreFiles/bin/python cloned
by above
... rinse and repeat for each X.Y

versus

. ./path/to/rvm/script
rvm install 1.8.7,1.9.2,rbx # fetch and install Ruby 1.8.7,
1.9.2, and Rubinius in rvm root
rvm 1.9.2 some-ruby-command args # run using Ruby 1.9.2.
rvm 1.8.7 some-other-rbcmd args # run using Ruby 1.8.7
rvm --default rbx # set default ruby for this shell
ruby file.rb args # use rubininus as ruby
ruby system # use systems ruby instead
ruby file.rb args # ^
 
D

Diez B. Roggisch

TerryP said:
Not quite. It basically amounts to a UNIX version of xcopy'ing an
existing Python installation.

... install Python X.Y by any means
python virtualenv.py -p=X.Y whereToStoreFiles # clone existing
Python X.Y install
python virtualenv.py --relocatable whereToStoreFiles # make xcopy/
tar friendly
. whereToStoreFiles/bin/activate
python file.py args # run using whereToStoreFiles/bin/python cloned
by above
... rinse and repeat for each X.Y

versus

. ./path/to/rvm/script
rvm install 1.8.7,1.9.2,rbx # fetch and install Ruby 1.8.7,
1.9.2, and Rubinius in rvm root
rvm 1.9.2 some-ruby-command args # run using Ruby 1.9.2.
python2.5

rvm 1.8.7 some-other-rbcmd args # run using Ruby 1.8.7
python2.4

rvm --default rbx # set default ruby for this shell

alias python=python2.5
ruby file.rb args # use rubininus as ruby
ruby system # use systems ruby instead
/usr/bin/python

ruby file.rb args # ^


Diez
 

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
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top