1
0
mirror of https://github.com/tiyn/wiki.git synced 2026-07-26 04:21:34 +02:00
Files
wiki/wiki/programming_language/python/pip.md

1.5 KiB

pip

pip is the default package manager for Python. It is used to install, update and remove Python packages from the Python Package Index (PyPI) and other package repositories.

Usage

Installing Packages

A package can be installed by replacing <package> with its name.

pip install <package>

It is generally recommended to install packages inside a virtual environment. Alternatively, project-based package managers such as uv can be used.

Global installation using pip is not recommended and system package manager should be preferred. When installing globally, however, on some Linux distributions global installation may require the --break-system-packages flag.

pip install --break-system-packages <package>

Migrating Global Packages to the System Package Manager

Due to it being more favorable to install global packages using a system package manager or a Python package manager such as uv which is able to handle global installations, it may be useful to migrate to a system package manager.

For Arch Linux systems the process for this is explained in the Pacman and AUR entry.