###python第三方库自动安装脚本###python

    #BatchInstall.py
    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("pip3 install "+lib)#注意 install后有一个空格
        print("Successful")        
    except:
        print("Failed Somehow")

你可能感兴趣的:(###python第三方库自动安装脚本###python)