参考: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:\python\module_name.whl
- 如果下载的是 *.tar.gz 包:cd到解压后路径
- 输入如下代码 python setup.py install
二、常用库
No. | Package |
Functional specification |
||
01 | pip |
====<<<< Description >>>>==== The PyPA recommended tool for installing Python packages. ====<<<< References >>>>==== |
||
02 | requests |
====<<<< Description >>>>==== Requests is the only Non-GMO HTTP library for Python, safe for human consumption. ====<<<< My Blog >>>>==== |
||
03 | twilio |
====<<<< Description >>>>==== A module for using the Twilio REST API and generating valid TwiML. ====<<<< My Blog >>>>==== |
||
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 >>>>==== |
||
05 | pynput |
====<<<< Description >>>>==== This library allows you to control and monitor input devices. ====<<<< My Blog >>>>==== |
||
06 | selenium |
====<<<< Description >>>>==== The selenium package is used to automate web browser interaction from Python. ====<<<< My Blog >>>>==== |
||
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. ====<<<< My Blog >>>>==== |
||
08 | PyQt4 |
====<<<< Description >>>>==== PyQt4 is a comprehensive set of Python bindings for Digia’s Qt cross platform GUI toolkit. ====<<<< My Blog >>>>==== |
||
09 | wget |
====<<<< Description >>>>==== 用来下载文件的。 ====<<<< My Blog >>>>==== |
||