docs/index.md
Pipenv is a Python virtualenv management tool that combines pip, virtualenv, and Pipfile into a single unified interface. It creates and manages virtual environments for your projects automatically, while also maintaining a Pipfile for package requirements and a Pipfile.lock for deterministic builds.
Linux, macOS, and Windows are all first-class citizens in Pipenv.
Pipenv solves several critical problems in the Python development workflow:
pip and virtualenv separately—they work together seamlessly.Pipfile.lock ensures that the exact same environment can be reproduced across different systems.pipenv graph..env files and development vs. production dependencies.pyenv or asdf is available.Pipfile.Pipfile when they are installed or uninstalled..env files to support customization and overrides.The recommended way to install pipenv on most platforms is to install from PyPI using pip:
$ pip install --user pipenv
For more detailed installation instructions, see the Installing Pipenv chapter.
Create a new project:
$ mkdir my_project && cd my_project
$ pipenv install
Install packages:
$ pipenv install requests
Create a Python file (e.g., main.py):
import requests
response = requests.get('https://httpbin.org/ip')
print(f'Your IP is {response.json()["origin"]}')
Run your script:
$ pipenv run python main.py
Activate the virtual environment:
$ pipenv shell
---
caption: Pipenv Documentation
maxdepth: 2
---
installation
quick_start
faq
migrating
pipfile
cli
commands
configuration
virtualenv
workflows
best_practices
security
troubleshooting
specifiers
indexes
credentials
shell
docker
scripts
pylock
advanced
diagnose
changelog
---
caption: Contributing to Pipenv
maxdepth: 2
---
dev/contributing
✨🍰✨