Finished "Install Requirements" option.

This commit is contained in:
ClaytonWWilson 2018-07-17 08:52:52 -04:00
parent 80a863c8f9
commit 46d20e69bc

View File

@ -188,11 +188,17 @@ def download(imageType, parsed_respObj):
return saveNameList
def installReqs():
if is_pip_installed == True:
# open Requirements.txt
# subprocess.call(["pip", "install", module], stdout=subprocess.DEVNULL,
# stdin =subprocess.DEVNULL,
# stderr=subprocess.DEVNULL)
if is_pip_installed() == True:
with open("requirements.txt") as f:
reqs = f.readlines()
reqs = [x.strip() for x in reqs]
for module in reqs:
print("Installing {}... ".format(module))
subprocess.call(["pip", "install", module], stdout=subprocess.DEVNULL,
stdin =subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
print("Done!\n")
else:
print("You need to install pip.")