-
Notifications
You must be signed in to change notification settings - Fork 0
/
artemis_adc_launcher.py
38 lines (26 loc) · 1.08 KB
/
artemis_adc_launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys
import venv
from os import getcwd, path
from subprocess import run
from time import time
# welcome print statements
print("Welcome to Team Cartographer's 2023 NASA ADC Application")
print("GitHub: https://github.com/abhi-arya1/cartographerADC23")
# Create a new virtual environment, given that there isn't one already.
venv_folder = path.join(getcwd(), "subprocess_venv")
if not path.exists(venv_folder):
start = time()
print("Creating virtual environment")
venv.create("subprocess_venv", with_pip=True)
print("Installing dependencies...")
# Add pip installation names here for any new package.
packages = ["Pillow", "numpy", "ursina", "PySimpleGUI", "orjson", "seaborn"]
for package in packages:
run([sys.executable, "-m", "pip", "install", package], check=True)
print(f"Installed package: {package}")
print(f"Venv creation completed in {round(time()-start, 2)}s")
print("\nRunning application")
# runs site_manager.py
program_path = getcwd() + "/site_manager.py"
program = run([sys.executable, program_path])
print("\nDeactivating")