File size: 372 Bytes
9cf79cf
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import subprocess

def install_packages_from_file(file_path):
    with open(file_path, 'r') as file:
        packages = file.readlines()
        for package in packages:
            package = package.strip()
            if package:
                subprocess.call(['pip', 'install', package])

if __name__ == "__main__":
    install_packages_from_file('requirements.txt')