Pipenv Cheatsheet

Quick References

CommandDescription
exitTo deactivate a pipenv environment
pipenv --python <version>Create a new virtual environment with the specified Python version (e.g., pipenv --python 3.9).
pipenv install <package>Install a package and add it to the Pipfile.
pipenv install --dev <package>Install a development package and add it to the [dev-packages] section of the Pipfile.
pipenv install --skip-lockInstall dependencies without locking them in Pipfile.lock.
pipenv uninstall <package>Uninstall a package and remove it from the Pipfile.
pipenv uninstall --allUninstall all dependencies from the environment.
pipenv lockGenerate Pipfile.lock from Pipfile.
pipenv updateUpdate all packages to the latest versions and update Pipfile.lock.
pipenv update <package>Update a specific package to the latest version.
pipenv shellSpawn a shell in the virtual environment.
pipenv run <command>Run a command in the virtual environment (e.g., pipenv run python script.py).
pipenv checkCheck for security vulnerabilities in dependencies.
pipenv graphDisplay a dependency graph of installed packages.
pipenv syncInstall all packages from Pipfile.lock.
pipenv cleanRemove unused packages from the virtual environment.
pipenv --rmRemove the virtual environment.
pipenv open <package>Open the installed package’s source folder.
pipenv install --ignore-pipfileInstall dependencies from Pipfile.lock only, ignoring changes in the Pipfile.
pip3 install pip_searchInstall the pip_search binary
pip_search <package>Search for the Python Package