【324】Python 库说明(安装&卸载)

参考:Python_安装官方whl包和tar.gz包

参考:Unofficial Windows Binaries for Python Extension Packages

参考:PyPI

参考:直接定位文件夹删除进行卸载(非在线安装)


  Python 最重要的就是各种库,而对于预装的 Python 来说并不包含所有的库,因此在工作学习中不免需要安装库来进行代码编写,本文主要介绍库的安装以及常用库的说明和下载链接等。

  显示目前所有库,通过下面的语句实现:

help('modules')

一、库的安装

1. 在线安装

  • 打开 cmd
  • 定位到 Python 文件夹下的 Scripts 文件夹(或者将其加入系统变量)
  • 输入如下代码 pip install module_name (经常失败)

2. 离线安装

  • 下载离线文件,一般直接搜索 https://pypi.org 可以获取
  • 进入 project 页面后,点击 Download files,然后下载适合的 *.whl 文件
  • 通过 cmd 安装,与 在线安装类似
  • 输入如下代码 pip install D:pythonmodule_name.whl  
  •  
  • 如果下载的是 *.tar.gz 包:cd到解压后路径
  • 输入如下代码 python setup.py install 

二、常用库

No. Package  

Functional specification

 
01 pip  

====<<<< Description >>>>====

The PyPA recommended tool for installing Python packages.
安装 python 库。
----------------------------------------------------------------------------------

====<<<< References >>>>====

[1] python安装库(Windows下)

02 requests  

====<<<< Description >>>>====

Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
读取打开网页。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【316】python.requests 读取网页信息

 03  twilio  

====<<<< Description >>>>====

A module for using the Twilio REST API and generating valid TwiML.
读取打开网页。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【319】Python 通过 Twilio 发短信息

 04  psutil
 

====<<<< Description >>>>====

psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python.
获取进程等信息。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【321】python进程监控:psutil

 05 pynput
 

====<<<< Description >>>>====

This library allows you to control and monitor input devices.
控制和监控鼠标和键盘。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【322】python控制键盘鼠标:pynput

 06  selenium
 

====<<<< Description >>>>====

The selenium package is used to automate web browser interaction from Python.
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【322】

07 Pillow  

====<<<< Description >>>>====

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors.
Python 图像库,可以实现图像处理,截图等操作。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【322】

 08  PyQt4  

====<<<< Description >>>>====

PyQt4 is a comprehensive set of Python bindings for Digia’s Qt cross platform GUI toolkit.
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【322】

09 wget  

====<<<< Description >>>>====

用来下载文件的。
----------------------------------------------------------------------------------

====<<<< My Blog >>>>====

【322】

         
原文地址:https://www.cnblogs.com/alex-bn-lee/p/9211999.html