Almost as a reference. I wrote it for myself so that I can use it by copying it for the time being.
direnv, pythonz, virtualenv, etc.
####### install packages
sudo apt-get -y install build-essential zlib1g-dev libbz2-dev libssl-dev libreadline-dev libncurses5-dev libsqlite3-dev libgdbm-dev libdb-dev libexpat-dev libpcap-dev liblzma-dev libpcre3-dev curl python-pip
####### install pythonz
curl -kL https://raw.github.com/saghul/pythonz/master/pythonz-install | bash
echo '[[ -s $HOME/.pythonz/etc/bashrc ]] && source $HOME/.pythonz/etc/bashrc' >> $HOME/.bashrc
source ~/.bashrc
####### install virtualenv
sudo pip install virtualenv
####### install direnv
curl -L -o direnv https://github.com/zimbatm/direnv/releases/download/v2.5.0/direnv.linux-amd64
sudo install direnv /usr/local/bin
echo 'type direnv > /dev/null 2>&1 && eval "$(direnv hook bash)" ' >> $HOME/.bashrc
pythonz list -a
# Available Python versions
# cpython:
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
The following is omitted
Install like this
pythonz install 3.4.0
Do the following in the path you want to develop
cd /PATH/TO/YOUR/PYTHON/PATH
echo 'layout python $(pythonz locate 3.4.0)' > .envrc
direnv allow
Modify .envrc
to direnv allow
A pip list
will show that it contains only the local packages for that version.
pip install ???
Install with
http://qiita.com/jnotoya/items/ca9a0dfee6b9f084f4da
Recommended Posts