- Install pipenv:
pip install pipenv- Create or activate virtualenvironment:
pipenv shell- Install dependency:
pipenv install flask=0.12.1
# or
pipenv install numpy # without exact version
# or
pipenv install -e git+https://github.com/requests/requests.git#egg=requests # From source- Install dependency as dev dependency:
pipenv install pytest --dev- Create or update
Pipfile.lockfile:
pipenv lock- For production environment, install dependecies from file(
PipfileandPipfile.lock):
pipenv install --ignore-pipfile- For install dependecies for development environment from file(
Pipfile):
pipenv install --dev- To see dependency graph:
pipenv graph
# or
pipenv graph --reverse- Open a package in editor:
pipenv open flask- You can run a command in the virtual environment without launching a shell:
pipenv run <insert command here>- Delete packages:
pipenv uninstall numpy # Remove a package
# or
pipenv uninstall --all # Reove all dependencies
# or
pipenv uninstall --all-dev # Remove all development dependenciesPipenv supports the automatic loading of environmental variables when a .env file exists in the top-level directory.
- Locate
virtual environment:
pipenv --venv- Locate project home directory:
pipenv --where