Location of Python `pip` packages (2024)

The ProblemJump To Solution

Where does Python’s pip install packages?

The Solution

The location of pip packages will vary between systems and projects based on the operating system, the installing user, and whether or not a virtual environment is in use. Different pip packages may be installed in different places on the same system. Therefore, the best way to find the location of a package is through pip’s show command.

Click to Copy

pip show numpy

This command will display various information about the package, including its location on disk. For example, the below output shows a local user installation of numpy on a Linux system:

Click to Copy

Location: /home/user/.local/lib/python3.10/site-packages

To view the locations of all Python packages, you can use pip list -v. In the output below, different packages are installed locally and globally:

Click to Copy

Package Version Location Installer---------------------------- --------------- ------------------------------------------------------------- ---------absl-py 1.2.0 /home/user/.local/lib/python3.10/site-packages pipaccelerate 0.12.0 /home/user/.local/lib/python3.10/site-packages pipaddict 2.4.0 /home/user/.local/lib/python3.10/site-packages pipaiocmd 0.1.5 /usr/lib/python3.10/site-packagesaiofiles 22.1.0 /usr/lib/python3.10/site-packages pipaiohttp 3.8.1 /home/user/.local/lib/python3.10/site-packages pipaiorpcX 0.22.1 /usr/lib/python3.10/site-packagesaiosignal 1.2.0 /home/user/.local/lib/python3.10/site-packages pip

Location of Python `pip` packages (2024)

FAQs

How to find location of pip installed packages? ›

Different pip packages may be installed in different places on the same system. Therefore, the best way to find the location of a package is through pip 's show command.

Where does pip store Python packages? ›

By default, Python packages installed through pip using the ' --user ' flag will be stored in your home directory depending on the specific version of Python they were installed with. Your home directory location, also equivalent to $HOME, will be noted by a ~.

How to find Python packages location? ›

Locally installed Python and all packages will be installed under a directory similar to ~/. local/bin/ for a Unix-based system, or \Users\Username\AppData\Local\Programs\ for Windows.

How to tell pip where to look for packages? ›

Finding Packages

pip looks for packages in a number of places: on PyPI (or the index given as --index-url , if not disabled via --no-index ), in the local filesystem, and in any additional repositories specified via --find-links or --extra-index-url .

Where are default pip packages located? ›

By default, on Linux, Pip installs packages to /usr/local/lib/python2.7/dist-packages. Using virtualenv or --user during install will change this default location. If you use pip show make sure you are using the right user or else pip may not see the packages you are referencing.

How to see pip installed packages? ›

To get a list of installed packages in Python, you can use the pip command-line tool with the list command. This will show all packages installed in the current environment.

Where does pip install get packages from? ›

Although pip uses PyPi as a default repository for fetching packages, it has also the capability to install packages from other sources, including: Version control systems like Github, Mercurial, Subversion, and Bazaar. Requirements files. Usually, Python packages require multiple packages to run.

Where are Python packages hosted? ›

PyPI primarily hosts Python packages in the form of source archives, called "sdists", or of "wheels" that may contain binary modules from a compiled language.

How to find where Python is installed? ›

Follow the steps below:
  1. Step 1: Open Terminal. You can open Terminal by searching for it in the Start menu and selecting "Terminal"
  2. Step 2: Use the Get-Command Command. In the Terminal window, type the following command: (Get-Command python).Path. Press Enter, and Terminal will reveal the paths where Python is installed.
Aug 25, 2023

What is the default location for Python site packages? ›

Default value is ~/. local/lib/pythonX.Y/site-packages for UNIX and non-framework macOS builds, ~/Library/Python/X.Y/lib/python/site-packages for macOS framework builds, and %APPDATA%\Python\PythonXY\site-packages on Windows.

Which directory to install Python packages? ›

When dealing with Python installations, we've noticed that third-party Python libraries may be installed in one of several directories:
  • lib/pythonX. ...
  • lib64/pythonX. ...
  • lib/pythonX/dist-packages on Debian/Ubuntu with system Python.
  • lib/python/site-packages on macOS with framework Python.
  • Lib/site-packages on Windows.
  • others?
Jan 7, 2022

How do I find the location of a Python file? ›

We can get the location (path) of the running script file . py with __file__. __file__ is useful for reading other files and it gives the current location of the running file.

Where does Python look for modules? ›

Python looks for modules in “sys.

It looks for a file called a_module.py in the directories listed in the variable sys. path .

How do I find pip package dependencies? ›

You'll need to view dependencies using one of these three commands in Python:
  1. Pip show displays information about one or more of your installed packages.
  2. Pipdeptree shows dependencies as a tree using a command line utility.
  3. Pip list will list installed packages with various conditions.
May 3, 2022

Where can I find my pip file? ›

The PIP configuration file can be found at %HOME%\pip\pip. ini. Pip also contains a legacy per-user configuration file. This file is located at %APPDATA%\pip\pip.

Where does pip install pull packages from? ›

Although pip uses PyPi as a default repository for fetching packages, it has also the capability to install packages from other sources, including: Version control systems like Github, Mercurial, Subversion, and Bazaar. Requirements files. Usually, Python packages require multiple packages to run.

Where does pip store downloaded files? ›

Overview. pip download does the same resolution and downloading as pip install , but instead of installing the dependencies, it collects the downloaded distributions into the directory provided (defaulting to the current directory).

How do I know where pip is installed Windows? ›

How to check if pip is installed on Windows and Mac: In Command Prompt on Windows or Terminal on Mac, type and enter: pip --version . If pip version is shown then it is installed.

Where does pip install -- user install to? ›

Here's where the --user flag makes the difference. When you use pip install --user cowsay , it directs pip to install packages in a user-specific location, typically ~/. local/lib/python${PY_MAJOR}.

Top Articles
Wealthy Affiliate Review: 30 Must-Know Things Before Buying - Dreamgrow
Mirage
Junk Cars For Sale Craigslist
Boggle Brain Busters Bonus Answers
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Gameplay Clarkston
Southland Goldendoodles
Ohiohealth Esource Employee Login
Gfs Rivergate
General Info for Parents
More Apt To Complain Crossword
Craigslist Alabama Montgomery
Tcgplayer Store
Buff Cookie Only Fans
Slope Tyrones Unblocked Games
St Maries Idaho Craigslist
Race Karts For Sale Near Me
How Long After Dayquil Can I Take Benadryl
Rs3 Ushabti
Regina Perrow
Hesburgh Library Catalog
1979 Ford F350 For Sale Craigslist
Visit the UK as a Standard Visitor
Frank Vascellaro
Ewg Eucerin
Bridgestone Tire Dealer Near Me
The value of R in SI units is _____?
Kokomo Mugshots Busted
Pitco Foods San Leandro
Frostbite Blaster
Terrier Hockey Blog
Mcgiftcardmall.con
Froedtert Billing Phone Number
Citibank Branch Locations In Orlando Florida
Casamba Mobile Login
Three V Plymouth
Cocorahs South Dakota
Trending mods at Kenshi Nexus
Tacos Diego Hugoton Ks
26 Best & Fun Things to Do in Saginaw (MI)
Willkommen an der Uni Würzburg | WueStart
American Bully Puppies for Sale | Lancaster Puppies
Wisconsin Volleyball titt*es
Online College Scholarships | Strayer University
Ronnie Mcnu*t Uncensored
Suppress Spell Damage Poe
Guy Ritchie's The Covenant Showtimes Near Look Cinemas Redlands
Game Like Tales Of Androgyny
Appsanywhere Mst
Festival Gas Rewards Log In
Taterz Salad
login.microsoftonline.com Reviews | scam or legit check
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 6734

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.