Is there a python equivalent of Ruby's 'rvm'?

PythonEggEquivalentRvm

Python Problem Overview


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.)

Python Solutions


Solution 1 - Python

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.

Solution 2 - Python

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

Solution 3 - Python

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

Solution 4 - Python

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.

Solution 5 - Python

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

Solution 6 - Python

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: https://stackoverflow.com/questions/10960805/apt-get-install-for-different-python-versions/59268046#59268046

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionconnyView Question on Stackoverflow
Solution 1 - PythonOlivier VerdierView Answer on Stackoverflow
Solution 2 - PythonhytdshView Answer on Stackoverflow
Solution 3 - PythonYuu YamashitaView Answer on Stackoverflow
Solution 4 - PythonChris OlstromView Answer on Stackoverflow
Solution 5 - PythonsahglieView Answer on Stackoverflow
Solution 6 - PythonCiro Santilli Путлер Капут 六四事View Answer on Stackoverflow