I want to download files from requirement.txt file, but I need manually edit directory where I need to download them.
For example usual pip download:
!pip download -r C:/Users/Test/requirements.txt -d C:/Users/Test/whldir
But I want put it to function where will be variables for directories:
reqs = C:/Users/Test/requirements.txt
whls = C:/Users/Test/whldir
!pip download -r reqs -d whls
Is this possible to do?
subprocess.Popen(or just the latter, it will concatenate it for you), so likesubprocess.Popen(["pip", "download", "-r", reqs, "-d", whls])(not sure about any extra arguments but this should work... I think)!pipsuggests the environment is Jupyter Notebook; the OP should have mentioned that and used proper tags.pipitself has no such facility, but the environment probably has support for variables of some kind. You seem to be asking aboutipythonor Jupyter; could you please edit to clarify which tool you are asking about?