Pip puts packages in a folder on your computer called site-packages
When you run pip install to add a Python package, pip downloads the code and stores it in a specific location on your machine. That location is called site-packages, and it lives inside your Python installation directory. The exact path depends on your operating system and whether you are using a virtual environment.
Understanding where packages land matters because you may need to find them later, move them, or troubleshoot why a package is not being found even though you installed it. The most common reason a package seems missing is that you installed it in one Python environment but are trying to use it in another.
Key Takeaways
- On Windows, site-packages is usually in C:\Users\YourUsername\AppData\Local\Programs\Python\Python311\Lib\site-packages or similar, depending on your Python version.
- On macOS and Linux, site-packages is usually in /usr/local/lib/python3.11/site-packages or ~/.local/lib/python3.11/site-packages, again depending on version.
- If you use a virtual environment, site-packages lives inside that environment folder, and packages installed there do not appear in your system Python.
- You can find your site-packages path by running python -m site in your terminal, which shows you exactly where pip will install.
The default location on Windows
On Windows, pip installs packages to a folder nested inside your Python installation. If you installed Python 3.11 using the official installer and chose the default location, site-packages will be at C:\Users\YourUsername\AppData\Local\Programs\Python\Python311\Lib\site-packages. The version number changes depending on which Python release you have — Python 3.10 would be Python310, Python 3.12 would be Python312, and so on.
If you installed Python in a different location, or used a third-party installer like Anaconda, the path will be different. The safest way to find it is to open Command Prompt or PowerShell and run python -m site. This command prints out the exact paths Python is using, including site-packages.
The default location on macOS and Linux
On macOS and Linux, pip installs to one of two places depending on how you installed Python. If you installed Python system-wide (for all users), packages go to /usr/local/lib/python3.11/site-packages or similar. If you installed Python for your user account only, packages go to ~/.local/lib/python3.11/site-packages, where the tilde represents your home directory.
Again, the version number in the path matches your Python version. To see your exact path, open a terminal and run python3 -m site. This is more reliable than guessing, especially if you have multiple Python versions installed on the same machine.
How virtual environments change the location
A virtual environment is a folder that contains its own copy of Python and its own site-packages directory. When you create a virtual environment and set up it, pip installs packages into that environment's site-packages, not into your system Python. This is the recommended way to work because it keeps projects isolated — packages you install for one project do not interfere with packages for another.
If you create a virtual environment called myenv on Windows, site-packages will be at myenv\Lib\site-packages. On macOS or Linux, it will be at myenv/lib/python3.11/site-packages. When you set up the virtual environment, pip automatically uses that location. When you deactivate it, pip goes back to using your system Python's site-packages.
Why you might not find a package you installed
The most common reason a package seems to have disappeared is that you installed it in one Python environment but are trying to use it in another. For example, you might have installed a package while a virtual environment was active, then later tried to use it in a script that runs with your system Python. The package exists — it is just in the wrong site-packages folder.
To check which Python and which site-packages your script is actually using, add these lines to your Python code and run it:
import sysprint(sys.executable)import siteprint(site.getsitepackages())
This tells you which Python interpreter is running and where it is looking for packages. If the path does not match where you installed the package, that is your problem.
How to see what is inside site-packages
You can browse site-packages like any other folder. On Windows, you can open File Explorer and navigate to the path. On macOS and Linux, you can open a terminal and use ls to list the contents. Each installed package gets its own folder or file inside site-packages.
Most packages are folders containing Python code. Some are single .py files. You will also see folders with names ending in .dist-info or .egg-info — these contain metadata about the package, like its version and dependencies. You do not need to edit anything in site-packages directly; pip handles all of that for you.
Frequently Asked Questions
Can I move site-packages to a different location?
You can, but it is not recommended and usually causes problems. Python looks for site-packages in specific locations, and if you move it, Python will not find it. If you want packages in a different location, create a virtual environment there instead, which is the proper way to organize Python projects.
What happens if I delete a package folder from site-packages?
The package will no longer be available to Python. This is the same as running pip uninstall packagename, except you are doing it manually. It is better to use pip to uninstall because pip also removes metadata and cleans up dependencies properly.
Why does my site-packages folder have so many packages I did not install?
Many packages depend on other packages. When you install one package, pip automatically installs its dependencies into site-packages as well. You can see what a package depends on by running pip show packagename, which lists its requirements.
Do I need to know the site-packages path to use pip?
No. Pip finds site-packages automatically. You only need to know the path if you are troubleshooting why a package is not being found, or if you want to manually inspect what is installed. For normal use, just run pip install and pip handles the rest.