Skip to content

Instantly share code, notes, and snippets.

@ricardo-valerio
Last active July 1, 2016 21:32
Show Gist options
  • Save ricardo-valerio/5d6885fd29054a22b36b to your computer and use it in GitHub Desktop.
Save ricardo-valerio/5d6885fd29054a22b36b to your computer and use it in GitHub Desktop.
Terminal Commands for Django Virtual Environments Configuration
##########################################################################
# Ubuntu:
##########################################################################
# create virtual env
virtualenv <NAME-OF-DESIRABLE-ENV-DIRECTORY>
or
python3 -m venv --without-pip <NAME-OF-DESIRABLE-ENV-DIRECTORY>
# activate virtual env
source <NAME-OF-DESIRABLE-ENV-DIRECTORY>/bin/active
# deactivate virtual env
deactivate
##########################################################################
# Mac Osx (hopefully, because I hadn't tested yet)
##########################################################################
# create virtual env
python3 -m venv <NAME-OF-DESIRABLE-ENV-DIRECTORY>
# activate virtual env
source <NAME-OF-DESIRABLE-ENV-DIRECTORY>/bin/active
# deactivate virtual env
deactivate
##########################################################################
# Util Commands
##########################################################################
which python3
which pip3
whereis python3
whereis pip3
pip3 install django # last version
pip3 install django==VERSION
pip3 freeze # list all packages
pip3 install -r requirements.txt
pip3 freeze > requirements.txt
pip3 install -U Django
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment