1. ホーム
  2. パイソン

python3 の問題 - サードパーティライブラリのインストール

2022-02-25 03:34:03
<パス

サードパーティライブラリのインストール

pythonライブラリのインストール方法と一般的なライブラリ
Pythonライブラリのインストール方法です。
pip install *** (ライブラリ名)

python library installation methods and common libraries
python library installation methods.

Method 1: setpu.py

1. Download the library package, unzip it, and record the path: *:/**/....../

2. Run cmd, switch to *:/*/....../ directory

3. Run setup.py build

4. Then type python, enter the python module, and verify whether the installation is successful

Method 2.

1. Win + R to open the run window, type cmd to enter

2. Find the installation path of pip - x:\Python xx\Scripts

3. switch to the directory in the command line cd x:\Python xx\Scripts

4. Type pip install ***(library name)

 

A complete list of commonly used libraries.

1. os - through python to achieve the functions in the operating system: new folder, specify the path, etc.

2. crawl the web

2.1 urllib - crawl the web

  urllib.request

2.2 bs4 - extract information from web pages by tag (download required)

2.3 re - (Regular Expression regular expressions)

2.4 Requests library - a Python third-party library that specializes in handling complex HTTP requests, cookies, headers (response and request headers), etc. (https://github.com/kennethreitz/ requests/tarball/master) 

2.5 smtplib - sending and receiving emails

2.6 The Selenium library is an API that is called on WebDriver, which is sort of like a browser that loads websites, but it can also be used like a BeautifulSoup object to find page elements, interact with elements on the page

(sending text, clicking, etc.), and performing other actions to run web crawlers.

2.7 collections - data structures

2.8 import random

 

PhantomJS is a "headless" browser. It loads the website into memory and executes the JavaScript on the page, but it does not present the graphical interface of the page to the user. Combining Selenium and PhantomJS together

together, you can run a very powerful web crawler that can handle cookies, JavaScrip, headers, and whatever else you need to do.

 

3. Data Storage

3.1 pymysql - python stores data to a mysql database

3.2 xlrd,xlwt - write data to excel

 

4. file reading

4.1 PDFMiner3K--take PDF files https://pypi.python.org/pypi/pdfminer3k

4.2 ython-docx library - hold the creation of new documents and read some basic file data, such as file size and file title, does not support the body to read.

 

5. Algorithms

5.1 NLTK - Natural Language Processing www.nltk.org Statistical Analysis, Word Sense Analysis - Book: Natural Language Processing with Python

5.2 Pillow and Tesseract - Image Recognition and Word Processing

  (http://pillow.readthedocs.org/)

  Tesseract is currently recognized as the best and most accurate open source OCR system. tesseract is a command line tool for Python, not a library imported through import statements. After installation, use the tesseract command to run outside of Python. On Windows systems, download the convenient executable installation file (https://code.google.com/p/tesseract-ocr/downloads/list) to install it. The biggest drawback of Tesseract is its handling of gradient background colors.

  Creating image positioning files: what each character is and exactly where each character is located - the online tool Tesseract OCR Chopper (http://pp19dd.com/tesseract-ocr-chopper/), as it requires no installation and It is easy to use: upload the image, click the "add" button if you want to add a new rectangle, resize the rectangle as needed, and finally copy the newly generated rectangle positioning file into a new file.

  If you are interested in other Tesseract training methods, or even building your own library of CAPTCHA training files, or want to share your results on a new font with Tesseract enthusiasts around the world, then I recommend you read the Tesseract documentation (https://github.com/tesseract-) carefully ocr/tesseract/wiki).

5.3 NumPy - Because NumPy can mathematically represent images as huge arrays of pixels, it works smoothly with Tesseract to get the job done.

 

 

6. JavaScript libraries

6.1 jQuery 

6.2 Google Analytics

 

7. GUI libraries

7.1 tkinter - python3


最近、私がpythonを書いていて遭遇した問題に対して、少しでもお役に立てればと思います。私は CSDN ブロガーの Xiao Wang です。 https://blog.csdn.net/cmqwan