I am looking for an alternative to
pip install -r requirements.txt
which can be used to install packages from a python module. I have used
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
for installing a package, however, this command seems to work only for a single package. Thanks in advance. Any help is appreciated.