Everywhere All articles Download Buy — $19

Where apps hide your files

Finding a Python virtualenv folder

Updated 2026-10-28 · 6 min read

Where a Python virtual environment lives depends on which tool made it: a .venv folder in your project, or a central folder for Poetry, Pipenv and others. This guide gives each default and the command that prints the real path.

It depends on the tool that made it

Python has no single folder for virtual environments. Where one lives depends on what created it:

<your project>/.venv                     python -m venv .venv, uv, or Poetry/Pipenv in-project mode
~/Library/Caches/pypoetry/virtualenvs/   Poetry's default
~/.local/share/virtualenvs/              Pipenv's default
~/.virtualenvs/                          virtualenvwrapper's default (WORKON_HOME)
~/miniconda3/envs/                       conda (see the conda post)

The first is the most common, and it is just a folder in the project. The others are central folders with one environment per project. Each path below comes from the tool's own documentation.

Find the active one right now

If a terminal prompt shows (name) at the start, an environment is active. Ask Python where it is:

which python
python -c "import sys; print(sys.prefix)"
echo $VIRTUAL_ENV

sys.prefix is the environment's folder. The activate scripts of venv, virtualenv and the tools built on them set VIRTUAL_ENV, but the Python documentation points out that an environment can be used without activating it, so an empty VIRTUAL_ENV does not prove none is in use. Conda sets CONDA_PREFIX instead.

Plain venv, virtualenv and uv

The Python documentation says python -m venv <folder> creates that folder with a pyvenv.cfg file, a bin folder holding the Python executable, and lib/pythonX.Y/site-packages. The folder name is whatever you typed; the same page calls .venv or venv in the project folder the usual choice. The activation line is:

source .venv/bin/activate

Because .venv starts with a dot, Finder hides it. Press ⇧⌘. in Finder to show hidden files, or run open .venv from the project folder.

uv venv also creates .venv, and uv's project commands put the project environment in .venv unless UV_PROJECT_ENVIRONMENT says otherwise. uv keeps its downloaded Pythons and its cache elsewhere, outside any project: uv's storage reference gives ~/.local/share/uv/python and ~/.cache/uv, and both exist on the Mac used for this guide.

Listing every environment on the disk

Each environment made by venv, virtualenv, uv, Poetry or Pipenv contains one pyvenv.cfg file, so searching for that name finds them:

find ~ -name pyvenv.cfg -not -path "$HOME/Library/*" 2>/dev/null
ls ~/Library/Caches/pypoetry/virtualenvs 2>/dev/null

Both are read-only. Each result's parent folder is an environment. The first line skips ~/Library to save time (macOS may ask whether Terminal can read Desktop, Documents or Downloads), so the second line covers Poetry's folder separately. Conda environments have no pyvenv.cfg and will not appear.

Poetry

The Poetry documentation gives the default for virtualenvs.path as {cache-dir}/virtualenvs, with the macOS cache directory defaulting to ~/Library/Caches/pypoetry. So:

~/Library/Caches/pypoetry/virtualenvs/<project>-<hash>-py3.12

The folder name joins the project name, a short hash and the Python version, like the documentation's example test-O3eWbxRl-py3.7. Poetry uses a project's existing .venv folder instead when one is there, or always when virtualenvs.in-project is set to true, and it reuses an environment that is already active rather than creating one. To print the one for the project you are in:

poetry env info --path
poetry env list --full-path

Pipenv

The Pipenv documentation says environments go in ~/.local/share/virtualenvs/ on macOS and Linux, in folders named from the project folder plus a hash of its full path, such as myproject-a1b2c3d4. WORKON_HOME moves all of them, PIPENV_VENV_IN_PROJECT=1 creates a .venv in the project, and if a .venv already exists there, Pipenv uses it automatically. To print the path for the current project:

pipenv --venv

virtualenvwrapper and pyenv-virtualenv

virtualenvwrapper keeps environments in the folder named by WORKON_HOME, and its documentation gives $HOME/.virtualenvs as the default (check with echo $WORKON_HOME). pyenv-virtualenv environments live inside pyenv's own folder, and pyenv prefix <name> prints the path.

Telling which tool made a folder

Look at what sits next to the environment folder. A poetry.lock or a [tool.poetry] section in pyproject.toml points to Poetry, a Pipfile to Pipenv, and a uv.lock to uv. With none of those, it was most likely made by hand with python -m venv. The pyvenv.cfg file inside has a home line naming the Python the environment was built from, so you can see whether it came from Homebrew, pyenv, uv or the system. Reading that one small file is safe: it holds paths, versions and a few settings.

Why a virtual environment cannot be moved

The Python documentation is blunt: environments are "not considered as movable or copyable". Scripts inside contain absolute paths to the environment's interpreter, so a copy or a renamed parent folder stops working. If you move a project, recreate the environment.

Deleting and rebuilding them

An environment is disposable as long as you have a list of its packages. Before removing one, save that list:

python -m pip freeze > requirements.txt

Open the file and check it lists what you expect. Then quit anything using the environment and move its folder to the Trash in Finder. For tool-managed ones, the supported commands are:

Environments holding large compiled libraries take far more space than small ones. To see which are biggest:

du -sh .venv
du -sh ~/Library/Caches/pypoetry/virtualenvs/* ~/.local/share/virtualenvs/* 2>/dev/null

Backing up or moving to a new Mac

Do not rely on restoring an environment folder. Back up your project with its requirements.txt, poetry.lock, Pipfile.lock or uv.lock, and rebuild on the new Mac. An environment copied from an Intel Mac to an Apple silicon one can carry compiled packages built for the wrong processor, on top of the absolute paths.

Why search misses them

Dot-folders like .venv, and the folders under ~/Library/Caches, are left out of normal Spotlight and Finder results. Inside, the files have generic names, and every environment contains a folder called site-packages.

Finding them again later

Typing pyvenv.cfg into Everywhere lists the virtual environments on the Mac in one go, including ones in projects you have forgotten and in the Poetry and Pipenv folders; projects in Documents or on the Desktop show up once it has Full Disk Access. Hits under a Homebrew Cellar folder are environments Homebrew built for its own Python tools (on the Mac used for this guide, awscli and ocrmypdf each have one in libexec), so leave those to brew. ⌘↵ reveals the file in Finder, and its parent folder is the environment.

Common questions

Where are Python virtual environments stored on a Mac?

Usually in a .venv folder inside the project. Poetry defaults to ~/Library/Caches/pypoetry/virtualenvs and Pipenv to ~/.local/share/virtualenvs.

How do I find which virtual environment is active?

Run which python, or in Python print sys.prefix, which is the active environment's folder. echo $VIRTUAL_ENV works when the environment was activated with its activate script.

Can I move a virtual environment to another folder?

Not reliably. The Python documentation says environments are not movable or copyable because scripts contain absolute paths. Recreate it in the new place from a requirements file.

How do I list all virtual environments on my Mac?

Every venv, virtualenv, uv, Poetry or Pipenv environment contains a pyvenv.cfg file, so searching for that name finds them. Conda environments do not have one; list those with conda env list.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support