Last active
December 30, 2015 18:19
-
-
Save fernandojunior/7866864 to your computer and use it in GitHub Desktop.
Shell script to install pip, virtualenv and virtualenvwrapper on ubuntu
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
#!/bin/bash | |
#install pip | |
sudo apt-get install python-pip | |
#install virtualenv | |
sudo pip install virtualenv | |
#install virtualenvwrapper | |
sudo pip install virtualenvwrapper | |
#configuration of virtualenv[wrapper] and pip at user startup file | |
echo -e "\n#location where the virtual environments should live" >> ~/.profile | |
echo -e "export WORKON_HOME=$HOME/.virtualenvs\n" >> ~/.profile | |
echo -e "#location of your development project directories" >> ~/.profile | |
echo -e "export PROJECT_HOME=$HOME/Workspace\n" >> ~/.profile | |
echo -e "#location of the script installed (virtualenvwrapper)" >> ~/.profile | |
echo -e "source /usr/local/bin/virtualenvwrapper.sh\n" >> ~/.profile | |
echo -e "#to ensure that new environments are isolated from the system site-packages directory" >> ~/.profile | |
echo -e "export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'\n" >> ~/.profile | |
echo -e "#to tell pip to only run if there is a virtualenv currently activated" >> ~/.profile | |
echo -e "export PIP_REQUIRE_VIRTUALENV=true" >> ~/.profile | |
#reload the startup file | |
source ~/.profile | |
# create new virtualenv | |
# mkvirtualenv --python=pathtopython yourvirtualenv | |
# workon yourvirtualenv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment