by Martin Brochhaus / @mbrochh
For newcomers this is should be the first thing to learn about the Python ecosystem
pip install virtualenv
cd ~/Projects/myproject
virtualenv venv
source venv/bin/activate
pip install requests
deactivate
Virtualenv alone is nice.
Combined with virtualenvwrapper, it is awesome.
# In terminal:
pip install virtualenvrapper
# In .bash_profile
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
export WORKON_HOME=$HOME/.virtualenvs
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
source /usr/local/bin/virtualenvwrapper.sh
# In terminal:
source ~/.bash_profile
mkvirtualenv myproject
workon myproject
deactivate
~/.virtualenvs/myproject/libs/python2.7/site-packages/
Python has wonderful code conventions. Just stick to them, be one of us :)
workon myproject
pip install flake8
source ~/.bashrc
flake8 .