【324】Python 库说明(安装&卸载)
参考:Unofficial Windows Binaries for Python Extension Packages
参考:PyPI
Python 最重要的就是各种库,而对于预装的 Python 来说并不包含所有的库,因此在工作学习中不免需要安装库来进行代码编写,本文主要介绍库的安装以及常用库的说明和下载链接等。
显示目前所有库,通过下面的语句实现:
1 | help ( 'modules' ) |
一、库的安装
1. 在线安装
- 打开 cmd
- 定位到 Python 文件夹下的 Scripts 文件夹(或者将其加入系统变量)
- 输入如下代码 pip install module_name (经常失败)
2. 离线安装
- 下载离线文件,一般直接搜索 https://pypi.org 可以获取
- 进入 project 页面后,点击 Download files,然后下载适合的 *.whl 文件
匹配电脑系统版本,windows64位对应win_amd64
匹配python版本,不然会提示安装错误(gensim-3.8.3-cp36-cp36m-win_amd64.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 >>>>==== |
||
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)