GitHab - utahta/pythonbrew
* install via easy install
$ easy_install pythonbrew
...
$ pythonbrew_install
* add the following line to ./bash_profile
source [YOUR_HOME]/.pythonbrew/etc/bashrc
* install the different version of python from your os built in.
$ pythonbrew install --no-test 3.2.1note: set --no-test option. Because the following error occurred:
unclosed file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='UTF-8'>refer to:
A Way of Code - Mac OS X LionでPython 2.7.2をビルドするとエラーになる
* check the installed version of python
$ pybrew list
# pythonbrew pythons
Python-3.2.1
* switch the version 3.2.1
$ pybrew switch 3.2.1
Switched to Python-3.2.1
* create virtualenv for the version.
$ pybrew venv create py32 -p 3.2.1
* check the environment
$ pybrew venv list
# virtualenv for Python-3.2.1 (found in [YOUR_HOME]/.pythonbrew/venvs/Python-3.2.1)
py32
* use the virtual environment
$ pybrew venv use py32
* deactivate the virtual environment
$ deactivate
* off the pythonbrew to use os built-in python.
$ pybrew off