Pip command encyclopedia & pip installation library error solution

Python library

Pygame :
Contains images and sounds, based on SDL, allowing real-time video game development without being restricted by low-level languages ​​(such as machine language and assembly language). Based on such a vision, all required game functions and concepts (mainly graphics) are completely simplified into the game logic itself, and all resource structures can be provided by high-level languages, such as Python. (Pygame originally replaced pySDL that stopped suddenly)
Chardet :
Character encoding detector, which can automatically detect the encoding of text, web pages, and xml.

colorama :
Mainly used to add various colors to the text, and it is very easy to use.

Prettytable :
Mainly used to build formatted output on the terminal or browser side.

difflib :
[Python] standard library, calculating text differences

Levenshtein :
Quickly calculate string similarity.

fuzzywuzzy :
Fuzzy string matching.

esmre :
Accelerator for regular expressions.

shortuuid :
A set of concise URL/UUID function libraries.

ftfy , Unicode text tool 7, unidecode, ascii and Unicode text conversion functions.

xpinyin , a function library for converting Chinese characters into pinyin

pangu.py , adjust the spacing of letters and numbers in Chinese, Japanese, and Korean characters.

pyfiglet , a figlet program written in Python, uses characters to compose ASCII art pictures

uniout , extract readable and writable characters in a string

awesome slugify , a Python slugify library for handling Unicode.

python-slugify , a slugify library that converts Unicode to ASCII internal code.

unicode-slugify , generate unicode internal code, a dependency package of Django.

ply , the Python version of lex and yacc parsing tool

phonenumbers , parse phone numbers, format, store and verify international phone numbers.

Python-user-agents browser's user agent (user-agents) parser.

sqlparse , SQL parser.

pygments , a general syntax highlighting tool.

python-nameparser parses people's names and decomposes them into individual components.

pyparsing , a general parser generation framework.

tablib , tabular data format, including XLS, CSV, JSON, YAML.

python-docx , docx document reading, query and modification, docx document of Microsoft Word 2007/2008.

xlwt/xlrd , read and write data files in Excel format.

xlsxwriter , to create xlsx files in Excel format.

xlwings , using Python to call Excel

csvkit , CSV file toolkit.

marmir , convert Python [data structure] into a spreadsheet.

pdfminer , to extract information from PDF files.

pypdf2 , a function library for merging and converting PDF pages.

Python-Markdown , a Python implementation of Markdown , a lightweight markup language.

Mistune , a fast, full-featured Markdown interpreter written in pure Python.

dateutil , an extension package of the standard Python official datetime module, a string date tool, where parser is to parse the string into datetime, and rrule is to generate datetime according to defined rules.

arrow , a Python library for better date and time handling

Chronyk , a Python 3 version function library, is used to parse the time and date written by people.

delorean , a function library for cleaning up time.

when.py provides humanized functions for the date and time of the meeting.

moment , a date/time Python library similar to Moment.js

pytz , world time zone, use tz database time zone information [database]

BeautifulSoup , a Python-based HTML/XML parser, is simple and easy to use, and has very powerful functions. Even if there is a bug or problematic html code, it can be parsed

lxml , a fast, easy-to-use, and flexible HTML and XML processing library with super powerful functions. When encountering defective or non-standard xml, Python's own xml processor may not be able to parse it. When an error is reported, the program will try to parse it using lxml's repair mode.

htmlparser , the official version parses HTML DOM tree, occasionally engaging in command line automatic form submission is useful.

pyyaml , the Python version of the YAML interpreter.

html5lib , -standard library, parsing and serializing HTML documents and fragments.

pyquery , an HTML interpreter function library similar to [jQuery].

cssutils , the Python CSS library.

MarkupSafe , XML or HTML/XHTML safe string markup tool.

bleach , bleaching, HTML-based whitelist function library.

xmltodict , an XML toolkit similar to JSON.

xhtml2pdf , HTML/CSS format converter, look at generating pdf documents.

untangle , converts XML documents into Python objects for easy access.

Pip command statement (executed in cmd)

View python version

python

View python installation path

where python

View pip version and pip installation path

pip -V

Check the default installation path of the library installed by pip

python -m site

View installed libraries

pip list

View upgradable libraries

pip list -o

Upgrade pip version (Method 1)

python -m pip install --upgrade pip

Upgrade pip version (Method 2)

pip install -U pip

Download library

pip install 库名

View the path of the library (installed)

pip install 库名

Download library (release time limit)

pip --default-timeout=时间 install 库名

Uninstall library

pip uninstall 库名

Update library

pip install --upgrade 库名

Update a certain version of the library (no spaces between and before and after the double equal sign)

pip install 库名==版本号

Force update library

pip install --ignore-installed 库名

Search library

pip search 库名

Common errors of pip installation library

1. When using the command window pip to install the python library, the progress bar is still going, and a large red error message appears after a while, and the last line shows:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files .pythonhosted.org', port=443): Read timed out

Analyze the reason:
It takes too long to download the installation package due to network speed, and the default time is exceeded.
Solution:
Enter pip --default-timeout=100 install library name

For example, if I install the lxml library, enter pip --default-timeout=100 install lxml

Just continue to wait
. 2. If you download the library to tens of percent, you will get an error, and a large part of the red letter will report an error.
Analysis of the reason:
Because we are installing pip in the cmd window, the default is to download foreign resources, and the network speed is often due to network problems. Unstable or even no network speed, this will cause errors when installing the library.
Solution:
Replace the source with a domestic mirror source, which not only solves the error, but also greatly improves the speed. How to change, please click on the portal------> How to change the domestic mirror source with pip .

Guess you like

Origin blog.csdn.net/CSDN_C2/article/details/108293462