Home > Backend Development > Python Tutorial > In which folder is the python download library placed?

In which folder is the python download library placed?

下次还敢
Release: 2024-03-29 06:18:35
Original
586 people have browsed it

Python library download location: By default, the library installed by pip is located at Linux/macOS: ~/.local/lib/python3.x/site-packages, Windows: %APPDATA%\Local\Packages\PythonSoftwareFoundation .Python.3.x_qbz5n2kfra8p0\LocalCache\local-packages\Python3x. In addition, the library will be stored as modules and files in a folder named after the library, and contains a special __init__.py file for identification.

In which folder is the python download library placed?

Python library download folder

When you install Python libraries using pip, they are downloaded and placed in a specific folder. By default, this folder is located at:

  • Linux and macOS: ~/.local/lib/python3.x/site-packages
  • Windows: %APPDATA%\Local\Packages\PythonSoftwareFoundation.Python.3.x_qbz5n2kfra8p0\LocalCache\local-packages\Python3x

Folder Structure

Downloaded libraries will be placed in a folder with the following structure:

  • : Contains the modules and files of the library.
  • __init__.py: A special file that allows the library to be recognized as a package by Python.

Change download location

If you wish to place the downloaded library in a different folder, you can use pip install --target option specifies the destination folder. For example:

<code>pip install --target=/path/to/my/custom/folder <库名称></code>
Copy after login

The above is the detailed content of In which folder is the python download library placed?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template