mirror of
https://github.com/Sosokker/Packaged-Food-Explorer.git
synced 2025-12-18 20:54:05 +01:00
15 lines
454 B
Python
15 lines
454 B
Python
import subprocess
|
|
import sys
|
|
|
|
def install(package):
|
|
try:
|
|
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
|
print(f"Successfully installed {package}")
|
|
except subprocess.CalledProcessError:
|
|
print(f"Failed to install {package}")
|
|
|
|
with open("requirements.txt", "r") as requirements_file:
|
|
requirements = requirements_file.read().splitlines()
|
|
|
|
for requirement in requirements:
|
|
install(requirement) |