Home >Backend Development >Python Tutorial >Where are the packages installed by pip?

Where are the packages installed by pip?

小老鼠
小老鼠Original
2023-12-07 16:22:084634browse

Packages installed through pip are usually stored in Python's site-packages directory. This directory is usually located under the Lib/site-packages folder of your Python installation. In this directory, files for all Python packages and libraries installed via pip can be found.

Where are the packages installed by pip?

The operating system for this tutorial: Windows 10 system, Python version 3.11.4, Dell G3 computer.

Packages installed through pip are usually stored in Python's site-packages directory. This directory is usually located under the Lib/site-packages folder of your Python installation. In this directory you can find files for all Python packages and libraries installed via pip.

You can find the site-packages directory by:

Use Python's interpreter to find the site-packages directory. Enter the following command in Python's interactive environment:

import siteprint(site.getsitepackages())

This will print out the path to the site-packages directory.

Manually navigate to the Python installation directory and find the Lib/site-packages folder. In this folder you will find files for all packages and libraries installed via pip.

Once you find the site-packages directory, you can find all the Python packages and libraries installed via pip there.

The above is the detailed content of Where are the packages installed by pip?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn