log("Installing Python dependencies")
reqFilePath = os.path.join(setupHome, "requirements.txt")
if os.path.isfile(reqFilePath):
reqItems = [line.strip() for line in open(reqFilePath)]
for r in reqItems:
log("Installing package: {0}".format(r))
subprocess.call([pipExePath, "install", "-U", "--upgrade", r])
else:
die("Dependency listing file not found: {0}".format(reqFilePath), 7)
After Change
log("Installing Microsoft Visual C++ Compiler")
vcSetupPath = os.path.join(distHome, "VCForPython27.msi")
locateFile(vcURL, vcSetupPath)
c = ["msiexec", "/i", vcSetupPath, "/qb-"]
log("Executing: {0}".format(" ".join(c)))
subprocess.call(c)
log("C++ Compiler for Python installed successfully")
except:
die("VC++ Compiler for Python installation failed!.", 4)