Python - Package Management
Table of Contents
Introduction
One of the most charmful characters of Python is its a rich number of packages. Accordingly, package managers emerge, e.g., pip
, setuptools
. This post just briefly introduce the usage of pip
.
Installation
In ArchLinux system, pip
can be easily installed by
pacman -S python-pip
As a dependency, python
will also be installed if it has not yet.
Configuration
Similar to the package manager of Linux operation systems, pip
connects with, synchronizes to, and downloads from websites. For the sake of download speed maximization, pip
is encouraged to visit the nearest mirror site, which can be configured by editing /etc/pip.conf
, e.g.,
[global] index-url = https://mirrors.163.com/pypi/simple
Usage
Install package(s)
pip install PKG_NAMES
Upgrade package(s)
pip install --upgrade PKG_NAMES pip install -U PKG_NAMES
Uninstall package(s)
pip uninstall PKG_NAMES
List installed packages
pip list
Search a package
pip search KEY_WORDS
Show information of an installed package
pip show PKG_NAME
Download package(s)
pip download PKG_NAMES