mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
update_dependencies.py : keep track of packages that were successful and those not
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -1,10 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
def main():
|
||||
command = "pip3 install pandas plotly numpy paramiko bokeh websocket-client pyarrow xlsxwriter pyshark influxdb influxdb-client matplotlib pdfkit pip-search --upgrade"
|
||||
res = subprocess.call(command, shell = True)
|
||||
print("Installing Script Python3 Dependencies")
|
||||
packages = ['pandas', 'plotly', 'numpy', 'paramiko', 'bokeh', 'websocket-client', 'pyarrow', 'xlsxwriter',\
|
||||
'pyshark', 'influxdb', 'influxdb-client', 'matplotlib', 'pdfkit', 'pip-search' ]
|
||||
packages_installed = []
|
||||
packages_failed =[]
|
||||
for package in packages:
|
||||
command = "pip3 install {} ".format(package)#pandas plotly numpy paramiko bokeh websocket-client pyarrow xlsxwriter pyshark influxdb influxdb-client matplotlib pdfkit pip-search --upgrade"
|
||||
res = subprocess.call(command, shell = True)
|
||||
if res == 0:
|
||||
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
||||
packages_installed.append(package)
|
||||
else:
|
||||
print("Package {} install FAILED Returned Value: {} ".format(package, res))
|
||||
print("To see errors try: pip3 install {}".format(package))
|
||||
packages_failed.append(package)
|
||||
|
||||
print("Returned Value: ", res)
|
||||
|
||||
print("Install Complete")
|
||||
print("Packages Installed Success: {}".format(packages_installed))
|
||||
print("Packages Failed (Some scripts may not need): {}".format(packages_failed))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user