Python
References
- Instructions for setting up: http://newcoder.io/begin/setup-your-machine/
- Pip package repo: https://pypi.python.org/pypi/
Pip
Tool to install Python packages. pip3 list # shows packages already installed pip3 list --outdated # shows outdated packages pip3 install --upgrade pip3
Virtualenv
Creates a virtual environment for a Python project to isolate dependencies.Equivalent of ruby's Gemfile. Install using pip:
pip3 install virtualenv
Virtualenvwrapper
Simplifies commands for virtualenv. Install using pip.
pip3 install virtualenvwrapper
Check the /usr/bin/local/virtualenvwrapper.sh script for set up.
Ensure it is using the correct python by additionally setting the VIRTUALENVWRAPPER_PYTHON
environment variable.
mkvirtualenv TestEnv # create a new virtual environment and activate
deactivate # deactivate the current virtual environment
workon # list current environments
workon TestEnv # activate the TestEnv virtual environment
rmvirtualenv TestEnv # remove the TestEnv virtual environment
See http://virtualenvwrapper.readthedocs.org/en/latest/index.html for further info.