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.")
评论列表
文章目录