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("pip install " + lib)
print("Successful")
except:
print("Failed Somehow")

猜你喜欢

转载自www.cnblogs.com/zhenshj/p/9049275.html