1.第三方Python库
库名 | 用途 | pip安装指令 |
---|
NumPy | 矩阵运算 | pip install numpy | Matplotlib | 产品级2D图形绘制 | pip install matplotlib | PIL | 图像处理 | pip install pillow | sklearn | 机器学习和数据挖掘 | pip install sklearn | Requests | HTTP协议访问 | pip install requests | Jieba | 中文分词 | pip install jieba | Beautiful Soup 或 bs4 | HTML和XML解析 | pip install beautifulsoup4 | Wheel | Python文件打包 | pip install wheel | pyinstaller | 打包Python源文件为可执行文件 | pip install pyinstaller | Django | Python最流行的Web开发框架 | pip install django | Flask | 轻量级Web开发框架 | pip install flask | WeRoBot | 微信机器人开发框架 | pip install werobot | Networkx | 复杂网络和图结构的建模和分析 | pip install networkx | SymPy | 数学符号计算 | pip install sympy | pandas | 高效数据分析 | pip install pandas | PyQt5 | 基于Qt的专业级GUI开发框架 | pip install pyqt5 | PyOpenGL | 多平台OpenGL开发接口 | pip install pyopengl | PyPDF2 | PDF文件内容提取及处理 | pip install pypdf2 | docopt | Python命令行解析 | pip install docopt | PyGame | 简单小游戏开发框架 | pip install pygame |
??可以在系统命令行下一个一个安装这些库,也可以在代码中实现这些库的自动安装。 ??也可以使用下面方法安装:
pip install opencv-python -i https://mirrors.aliyun.com/pypi/simple/
2.使用代码自动安装库
import os
libs = {"numpy","matplotlib","pillow","sklearn","requests",\
"jieba","beautifulsoup4","wheel","networkx","sympy",\
"pyinstaller","django","flask","werobot","pyqt5",\
"pandas","pyopengl","pypdf2","docopt","pygame"}
try:
for lib in libs:
os.system("pip install "+lib)
print("Successful")
except:
print("Failed Somehow")
|