Build version control with Pythonz and virtual environment with virtualenv
install
$ sudo pip install virtualenv virtualenvwrapper
When the virtualenv environment is ~ / .virtualenvs
## virtualenv, virtualenvwrapper
which virtualenvwrapper.sh > /dev/null
if [ $? -eq 0 ]; then
source `which virtualenvwrapper.sh`
mkdir -p ~/.virtualenvs
export WORKON_HOME=~/.virtualenvs
export PIP_RESPECT_VIRTUALENV=true
fi
install
$ curl -kL https://raw.github.com/saghul/pythonz/master/pythonz-install | bash
# Pythonz
if [ -s $HOME/.pythonz/etc/bashrc ]; then
source $HOME/.pythonz/etc/bashrc
fi
$ pythonz install 2.7.5
$ pythonz install 2.6.9
$ pythonz install 3.3.3
#Verification
$ pythonz list
==>
CPython-2.6.9
CPython-2.7.5
CPython-3.3.3
Pythonz + virtualenv
$ mkvirtualenv -p ~/.pythonz/pythons/CPython-2.6.9/bin/python2.6 v2.6.9 && deactivate
$ mkvirtualenv -p ~/.pythonz/pythons/CPython-2.7.5/bin/python2.7 v2.7.5 && deactivate
$ mkvirtualenv -p ~/.pythonz/pythons/CPython-3.3.3/bin/python3.3 v3.3.3 && deactivate
# activate
$ workon v2.7.5
# deactivate (to System)
$ deactivate
# remove
$ rmvirtualenv v2.6.9
[reference] -Virtualenvwrapper command reference http://virtualenvwrapper-docs-ja.readthedocs.org/en/latest/command_ref.html
Recommended Posts