146

Q: Do we have anything functionally equivalent in Python to the Ruby version manager 'rvm'?


(RVM lets you easily switch completely between different versions of the ruby interpreter and different sets of gems (modules). Everything concerning download-build-install-switch of interpreter(-s) and gems gets taken care of by invoking rvm. It is all run under your regular user account.)

6 Answers 6

99

Yes, it is virtualenv along with virtualenvwrapper.

update: you may install both at once with virtualenv burrito.

Update: the correct answer is now probably pyenv.

For scientific computing, the corresponding tool is anaconda.

Sign up to request clarification or add additional context in comments.

9 Comments

I'm confused. Where can you install different versions of python? It seems to be just using the system's version of python.
But is there a way to bundle a specific Python install (say, 2.7) with certain eggs in one project, and with certain other eggs in another? RVM manages all this stuff seamlessly, and sudo is a thing of the past.
Virtualenv allows to juggle between versions of Python, and between different sets of eggs; but it won't deal with the compilation+installation of Python itself. RVM does exactly that for Ruby. If you want to build a specific version of Python because you can't install it out of packages for some reason, then you want to check pythonbrew instead (just the other answer just below).
I don't see how this supports several versions of python.
RVM does take care for compiling Ruby interpreters. It also allows downloading precompiled ones, if available.
|
87

Pythonbrew is no longer under development. The former maintainer suggests to use "PyEnv" instead (see below)".

pythonbrew has come! http://github.com/utahta/pythonbrew

pyenv: https://github.com/yyuu/pyenv

7 Comments

Interesting, might be worth a try. I see that its command invocations are quite similar that of to rvm...
As someone who is quite adept to rvm, pythonbrew was an absolute breeze to get accustomed to. Thanks for the tip!
Thank you very much. I believe this is the real answer from now on.
Should add be good to see pypy and jython added to the list of known pythons.
Not that much of traffic anymore. Is this still worth looking into?
|
52

I created pyenv which is a fork of Ruby's rbenv and modified for Python. Like pythonz, pyenv also supports Stackless, PyPy, and Jython.

Comments

6

Following up on hytdsh's answer (nearly two years later)...

pythonz a fork of pythonbrew that adds support for Stackless, PyPy, and Jython.

If you like how rvm handles different interpreters, it may worth taking a look at pythonz. If you're strictly working with CPython, the difference is less significant.

Comments

5

Optionally, if you're using Macports you can use python_select. Install python_select with:

$ sudo port install python_select 

Assuming python 2.6 and 2.5 have bee installed via Macports you can switch pythons like so:

$ sudo python_select python25 => Selecting version "python25" for python $ python --version => 2.5.5 $ sudo python_select python26 => Selecting version "python26" for python $ python --version => 2.6.6 

Comments

2

pyenv 1.2.15 can build and install Python for you

Maybe this was not possible in earlier version, but when I tested in 1.2.15 I noticed the pyenv install option which worked:

pyenv install 3.8.0 

Therefore I feel that it is reasonable to call pyenv a replacement for RVM.

I have given a fully detailed example of its usage at: apt-get install for different python versions

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.