Last active
December 15, 2015 04:49
-
-
Save hiroakis/5203963 to your computer and use it in GitHub Desktop.
My Python developing environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install pyenv in ~/.pyenv | |
cd ~ | |
git clone git://github.com/yyuu/pyenv.git .pyenv | |
echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.zshrc | |
echo 'if [ -d "${PYENV_ROOT}" ]; then' >> ~/.zshrc | |
echo ' export PATH=${PYENV_ROOT}/bin:$PATH' >> ~/.zshrc | |
echo ' eval "$(pyenv init -)"' >> ~/.zshrc | |
echo 'fi' >> ~/.zshrc | |
# Reload user's shell | |
exec $SHELL -l | |
# Install virtualenv as a pyenv plugin | |
cd $PYENV_ROOT/plugins | |
git clone git://github.com/yyuu/pyenv-virtualenv.git | |
# Lists available Python versions | |
pyenv install -l | |
# Install Python | |
pyenv install 2.7.3 | |
pyenv install 3.2.3 | |
# Sets the global version of Python to be used in all shells | |
pyenv gloabl 2.7.3 | |
# Sets a local application-specific Python version | |
pyenv local 2.7.3 | |
# Lists installed Python versions | |
pyenv versions | |
# Current active Python version | |
pyenv version | |
# Uninstall Python in pyenv | |
pyenv uninstall 3.2.3 | |
# Create virtual Python environment "dev01" as a Python 2.7.3 | |
pyenv virtualenv --distribute 2.7.3 dev01 | |
# Sets dev01 environment to directory Python_2.7.3_practice | |
mkdir Python_2.7.3_practice | |
cd Python_2.7.3_practice | |
pyenv local dev01 | |
# Uninstall dev01 | |
pyenv uninstall dev01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment