Everywhere All articles Download Buy — $19

Where apps hide your files

Finding site-packages for each Python on your Mac

Updated 2026-10-28 · 6 min read

A Mac usually has several Pythons, each with its own packages folder. One command shows which one pip is using, and the rest explains the layout, cache and cleanup.

One command gives the answer

pip installs into whichever Python it belongs to, so there is no single folder. Ask the interpreter you actually use:

python3 -m site
python3 -m pip --version
python3 -c "import sysconfig; print(sysconfig.get_paths()['purelib'])"

python3 -m site prints the full search path, plus USER_BASE and USER_SITE and whether they exist. pip --version shows the folder pip itself lives in, which is usually the site-packages it installs into (Apple's Python is the exception, below). Using python3 -m pip rather than a bare pip guarantees pip and the interpreter match.

The usual places on a Mac:

/Library/Frameworks/Python.framework/Versions/3.x/lib/python3.x/site-packages     python.org installer
/opt/homebrew/lib/python3.x/site-packages                                         Homebrew, Apple silicon
/usr/local/lib/python3.x/site-packages                                            Homebrew, Intel
~/Library/Python/3.x/lib/python/site-packages                                     pip install --user, Apple's Python
<project>/.venv/lib/python3.x/site-packages                                       a virtual environment

Replace 3.x with your version. On the Mac used to check this guide, Apple's /usr/bin/python3 is Python 3.9.6 and runs from Xcode's developer folder, so its bundled packages sit under /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages, while packages you add go to ~/Library/Python/3.9/lib/python/site-packages.

To open your user folder, press ⇧⌘G in Finder and paste the path, or run open "$(python3 -c 'import site; print(site.getusersitepackages())')" (it only works once that folder exists).

Why there are so many Pythons

A Mac can carry several Python installs at once, and each has its own packages:

If pip install worked but import fails, you almost certainly installed into a different Python from the one running your code. Compare python3 -m site with what your editor or script uses.

Inside a site-packages folder

ItemMeaning
requests/The package's code
requests-2.x.dist-info/Metadata: METADATA, the file list (RECORD), INSTALLER
*.egg-info/Older style of the same metadata
*.pth filesLines that add extra folders to the import path
__pycache__/Compiled bytecode, regenerated automatically
*.so filesCompiled extensions, built for a particular Python version and CPU

The dist-info folder is how pip knows what is installed and which files to remove. Deleting a package's code folder by hand leaves the record behind and confuses later installs.

The pip cache and command-line tools

pip keeps downloaded wheels and HTTP responses in a cache:

python3 -m pip cache dir

On macOS that is ~/Library/Caches/pip. Check its size with du -sh ~/Library/Caches/pip. The command python3 -m pip cache purge empties it, and that is safe because packages are downloaded again when needed.

Commands installed by packages (for example black or jupyter) land in a bin folder belonging to that Python. For user installs that is ~/Library/Python/3.x/bin, which is often not on your PATH. That is why a freshly installed tool says "command not found" until you add the folder to your PATH in ~/.zprofile.

Listing, cleaning up and moving

Read-only first: python3 -m pip list shows installed packages and python3 -m pip show <name> shows a package's version and Location:, which is the quickest way to find where one package lives.

To remove one, use python3 -m pip uninstall <name>. To remove a project's packages entirely, delete its virtual environment folder (move .venv to the Trash in Finder); nothing else on the Mac depends on it. Never delete the Apple or Homebrew Python's own site-packages to clean up, since the interpreter and other tools need what is in there.

To move packages to another Mac or Python version, do not copy folders: compiled extensions are tied to the Python version and chip. Run python3 -m pip freeze > requirements.txt in the old environment, then python3 -m pip install -r requirements.txt in a fresh virtual environment on the new one. pip's documentation also covers changing the user install location with the PYTHONUSERBASE environment variable.

Why search does not show them

Most of these folders are in ~/Library, inside Xcode's app bundle or under hidden directories such as .venv, .pyenv and .local, and Spotlight leaves all of those out. Homebrew's folders under /usr/local or /opt/homebrew sit inside system folders that Finder hides, so a search by package name rarely leads you to the copy you need.

Locating a package when you forgot which Python

Type a package's folder name into Everywhere, such as numpy or requests-2, and every copy across the Mac appears with its full path, including those inside Xcode's bundle and in virtual environments (for a .venv in a project under Documents or the Desktop, grant Everywhere Full Disk Access first). The path tells you at once which Python owns each one. Press ⌘↵ to reveal it in Finder. It searches names only, so it cannot show the version recorded in a METADATA file; pip show does that.

Common questions

Where does pip install packages on a Mac?

Into the site-packages folder of the Python that pip belongs to. Run python3 -m site or python3 -m pip show <package> to see the exact path for your interpreter.

Where is site-packages for the system Python on macOS?

Apple's Python runs from Xcode or the Command Line Tools, and its own folder there is not writable, so pip installs go to ~/Library/Python/3.x/lib/python/site-packages.

Where is the pip cache on a Mac?

In ~/Library/Caches/pip. python3 -m pip cache dir prints it and python3 -m pip cache purge clears it.

Why does pip say externally-managed-environment?

Homebrew and some other Pythons mark themselves as managed by another tool. Create a virtual environment with python3 -m venv .venv, or use pipx for command-line tools.

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