MCPcopy Create free account
hub / github.com/Jaysmito101/TerraForge3D / __InstallPackage

Method __InstallPackage

scripts/SetupPython.py:33–44  ·  view source on GitHub ↗
(cls, packageName)

Source from the content-addressed store, hash-verified

31
32 @classmethod
33 def __InstallPackage(cls, packageName):
34 permissionGranted = False
35 while not permissionGranted:
36 reply = str(input("Would you like to install Python package '{0:s}'? [Y/N]: ".format(packageName))).lower().strip()[:1]
37 if reply == 'n':
38 return False
39 permissionGranted = (reply == 'y')
40
41 print(f"Installing {packageName} module...")
42 subprocess.check_call(['python', '-m', 'pip', 'install', packageName])
43
44 return cls.__ValidatePackage(packageName)
45
46if __name__ == "__main__":
47 PythonConfiguration.Validate()

Callers 1

__ValidatePackageMethod · 0.80

Calls 1

__ValidatePackageMethod · 0.80

Tested by

no test coverage detected