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.
Don't forget to replace "package" with "-r requirements.txt":
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With