Pipenv
Table of Contents
Overview
Commands
pipenv --python 3.6 # specify python version for venv
pipenv --where # output project path
pipenv --venv # output venv path
pipenv --py # output python path
pipenv --rm # remove existing venv
pipenv graph # show dependency graph
pipenv install -e . --dev # for dev
pipenv install requests # add dependency
pipenv install pytest --dev # add dev dependency
pipenv install --dev # install all dependencies including dev
pipenv sync # install dependencies specified in Pipfile.lock
pipenv clean # remove packages not specified in Pipfile.lock
pipenv uninstall --all # Clear
pipenv shell # run a shell activated venv
pipenv run python # run a command with venv activated- When executing
pipenv shell or pipenv run,.envis loaded
Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
ipython = "<6.5"
jupyter = "*"
[dev-packages]
[requires]
python_version = "3.6"
How-to
Update dependencies howto
- Run
pipenv update, which will refreshPipefile.lockand install dependencies based on the file.
Discussions
About Pipfile.lock discussion
- Use
pipenv lockto createPipfile.lock. - If you have a problem when running
pipenv lock, usepipenv lock --clearto clear cache. - It declares all dependencies of the project, their latest available versions, and the hashes.
Reference
pipenv install
pipenv installjust installs only packages defined in[packages]pipenv install --devinstalls packages in[dev-packages]along with packges in[packages]