Red-GUI.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Red-GUI 作者: ScarletRav3n 项目源码 文件源码
def run(self):
        remove_reqs_readonly()
        interpreter = sys.executable

        if interpreter is None:
            print("Python interpreter not found.")
            return

        txt = REQS_TXT if self.audio else REQS_NO_AUDIO_TXT

        args = [
            interpreter, "-m",
            "pip", "install",
            "--upgrade",
            "--target", REQS_DIR,
            "-r", txt
        ]

        if IS_MAC:  # --target is a problem on Homebrew. See PR #552
            args.remove("--target")
            args.remove(REQS_DIR)

        code = subprocess.call(args, creationflags=subprocess.CREATE_NEW_CONSOLE, shell=False)

        if code == 0:
            print("Requirements setup completed.")
        else:
            print("An error occurred and the requirements "
                  "setup might not be completed. Consult the docs.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号