Last active
July 1, 2016 21:32
-
-
Save rvzzz/5d6885fd29054a22b36b to your computer and use it in GitHub Desktop.
Terminal Commands for Django Virtual Environments Configuration
This file contains hidden or 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
########################################################################## | |
# 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