python第三方库自动安装脚本
Posted zhenshj
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python第三方库自动安装脚本相关的知识,希望对你有一定的参考价值。
#python第三方库自动安装脚本,需要在cmd中运行此脚本
#BatchInstall.py
import os
libs = {"numpy","matplotlib","pillow","sklearn","requests",\
"jieba","beautifulsoup4","wheel","networkx","sympy",\
"pyinstaller","django","flask","werobot","pyqt5",\
"pandas","pyopeng1","pypdf2","docopt","pygame"}
try:
for lib in libs:
os.system("pip3 install " + lib)
print("Successful")
except:
print("Failed Somehow")
以上是关于python第三方库自动安装脚本的主要内容,如果未能解决你的问题,请参考以下文章