Where Does Pipenv Store Virtualenvs?
Pipenv creates one virtual environment per project in a central folder and tracks dependencies with a Pipfile in the project root. The environment folder name combines the project name with a path hash.
Last updated
Central storage keeps project folders free of interpreter files by default. Use the venv lookup command to print the exact path for the current project.
Project local mode creates a dot venv folder inside the project instead. A custom base location is set with WORKON_HOME and a custom name with PIPENV_CUSTOM_VENV_NAME.
Where Pipenv stores this, by platform
/home/<user>/.local/share/virtualenvs/<project>-<hash>/
<user> is the Linux account name. <project> is the project directory name. <hash> is derived from the full project path. Pipfile lives at project root as <project-dir>/Pipfile.
/Users/<user>/.local/share/virtualenvs/<project>-<hash>/
<user> is the macOS account name. <project> is the project directory name. <hash> changes when the project moves. Use venv lookup from the project folder to confirm.
C:\Users\<user>\.virtualenvs\<project>-<hash>\
<user> is the Windows account name. Base maps to USERPROFILE dot virtualenvs. With PIPENV_VENV_IN_PROJECT set, env lives at project root dot venv instead.
Frequently asked questions
Why did my env disappear after a rename?
The folder hash includes the full project path, so renames create a new expected name. Recreate with install from the existing Pipfile and remove the orphaned folder under virtualenvs.
How do I use a project local env?
Set PIPENV_VENV_IN_PROJECT to 1 before install. Pipenv then creates dot venv inside the project. An existing dot venv is reused even without that setting.
Notice an outdated path? Let us know.