Created
January 27, 2019 10:43
-
-
Save liquidgenius/0162d454caf4c7ae679abc6d6eaaf7a6 to your computer and use it in GitHub Desktop.
A cheat sheet of commands to make using pipenv easy.
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
# Pipenv Cheat Sheet | |
## Install pipenv | |
``` | |
pip3 install pipenv | |
``` | |
## Activate | |
``` | |
pipenv shell | |
``` | |
## Check version of Python | |
``` | |
python --version | |
``` | |
## Check path | |
``` | |
python | |
>>> import sys | |
>>> sys.executable | |
quit() | |
``` | |
## Install a package | |
``` | |
pipenv install camelcase | |
``` | |
## Check local packages | |
``` | |
pipenv lock -r | |
``` | |
## Uninstall a package | |
``` | |
pipenv uninstall camelcase | |
``` | |
## Install a dev package | |
``` | |
pipenv install nose --dev | |
``` | |
## Install from requirements.txt | |
``` | |
pipenv install -r ./requirements.txt | |
``` | |
## Create Django project | |
``` | |
django-admin startproject testproject | |
cd testproject | |
python manage.py runserver | |
``` | |
## Check security vulnerabilities | |
``` | |
pipenv check | |
``` | |
## Update Django | |
``` | |
pipenv install | |
``` | |
## Run check again | |
``` | |
pipenv check | |
``` | |
## Check dependency graph | |
``` | |
pipenv graph | |
``` | |
## Ignore pipfile | |
``` | |
pipenv install --ignore-pipfile | |
``` | |
## Set lockfile - before deployment | |
``` | |
pipenv lock | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment