Where Does Pipenv Store Virtualenvs?
Pipenv centralizes venvs by project name plus path hash. The per OS roots and the flags that move them.
Last updated
Pipenv creates one virtualenv per project in a central folder: ~/.local/share/virtualenvs on Linux and macOS, %USERPROFILE%\.virtualenvs on Windows. Names combine the project dir with a path hash, like myproject-a1b2c3d4, so renames orphan the old env.
Two variables change the scheme: WORKON_HOME relocates the central folder, PIPENV_VENV_IN_PROJECT drops a .venv inside the project instead. pipenv --venv prints the live path for the current project, which settles every dispute when several envs look alike.
Where Pipenv stores this, by platform
~/.local/share/virtualenvs
Name plus hash folders inside. pipenv --venv reveals the active one. WORKON_HOME moves the root; PIPENV_VENV_IN_PROJECT=1 switches to per project .venv.
~/.local/share/virtualenvs
Same central layout as Linux. The hash tracks the project path, so moving the project folder strands the env until recreated.
%USERPROFILE%\.virtualenvs
Same scheme under the profile. pipenv --py shows the interpreter path inside the env for IDE wiring.
Frequently asked questions
how do i find my pipenv virtualenv
Run pipenv --venv in the project folder. It prints the exact env path including the hash suffix. pipenv --py goes one step further to the interpreter binary.
how do i keep pipenv venv inside the project
Export PIPENV_VENV_IN_PROJECT=1 before install. The env lands in .venv next to the Pipfile. That layout suits containers and editors that expect local envs.
Notice an outdated path? Let us know.