I want nicer version manager like rbenv for python.
- do things almost like rbenv.
- implemented as pure shell scripts (bash and zsh).
- have all pythons in
$PATHto use them fromtoxeasily.
Of course, I know there are tools for python.
I am using pythonz currently, but I think there are some problems.
- they are depending on python.
- there is bootstrap problem.
- and also there are python's
2to3problems.
- not manages user's
$PATH. (pythonz) - cannot manage multiple pythons at a time.
I'd like to write scripts and let it be an alternative to them. The notes following are an idea note of new scripts (called pyenv).
show installed pythons.
% pyenv versions
CPython-2.5.6
CPython-2.6.8
CPython-2.7.3
CPython-3.2.3
execute command in pyenv.
% pyenv exec python --version
Python 2.7.3
show global stack of pythons.
% pyenv global
CPython-2.7.3
CPython-2.6.8
CPython-3.2.3
% pyenv which python2.7
/home/yyuu/.pyenv/versions/CPython-2.7.3/bin/python2.7
% pyenv which python2.6
/home/yyuu/.pyenv/versions/CPython-2.6.8/bin/python2.6
% pyenv which python
/home/yyuu/.pyenv/versions/CPython-2.7.3/bin/python
show local stack of pythons.
% pyenv local
CPython-2.5.6
CPython-2.6.8
CPython-2.7.3
modify global stack.
% rm -f ~/.pyenv-version
% echo -e "CPython-2.6.8\nCPython-2.7.3" > ~/.pyenv-version
% pyenv exec python --version
Python 2.6.8
install new python.
% pyenv global
CPython-2.7.3
CPython-2.6.8
CPython-3.2.3
% pyenv pypy-1.9
(... snip ...)
% pyenv global
PyPy-1.9
CPython-2.7.3
CPython-2.6.8
CPython-3.2.3
run tox with pythons. since pyenv has all pythons on $PATH, we can easily find all of them from tox.
% tox
created new project.
https://github.com/yyuu/pyenv