Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to download all the python packages mentioned in the requirement.txt to a folder in linux?

I want to download all the python packages mentioned in the requirement.txt to a folder in Linux. I don't want to install them. I just need to download them.

python version is 3.6

list of packages in the requirement.txt

aiodns==0.3.2
aiohttp==1.1.5
amqp==1.4.7
anyjson==0.3.3
astroid==1.3.2
asyncio==3.4.3
asyncio-redis==0.14.1
billiard==3.3.0.20
blist==1.3.6
boto==2.38.0
celery==3.1
pexpect==4.0
pycryptodomex==3.7.0
pycurl==7.19.5.1
pyinotify==0.9.6
pylint==1.4.0
pyminifier==2.1
pyOpenSSL==0.15.1
pypacker==2.9
pyquery==1.2.9
pysmi==0.3.2
pysnmp==4.4.4
PyStaticConfiguration==0.9.0
python-daemon==2.1.2
python-dateutil==2.4.2
python-ldap==3.2.0
python-libnmap==0.6.2
python-otrs==0.4.3
pytz==2015.4
PyYAML==3.11
query-string==0.0.2
queuelib==1.2.2
redis==2.10.3
requests==2.22.1
requests-aws4auth==0.9
requests-oauthlib==0.5.0
requests-toolbelt==0.5.0
scp==0.10.2
six==1.10.0
South==1.0.1
tlslite==0.4.9
u-msgpack-python==2.1
urllib3==1.14
w3lib==1.12.0
websockets==3.3
Werkzeug==0.10.4
xlrd==1.0.0
XlsxWriter==1.0.5
zope.interface==4.1.2
GitPython==2.1.3
like image 881
Smruti Sahoo Avatar asked Jun 30 '20 13:06

Smruti Sahoo


People also ask

How do I download all packages from requirements txt?

Use the pip install -r requirements. txt command to install all of the Python modules and packages listed in your requirements. txt file.

How do I download all Python packages?

Use the pipdeptree utility to gather a list of all dependencies, create a requirements. txt file listing all the dependencies, and then download them with the pip download command. Get the list of dependencies for a package from the setup.py file.


1 Answers

The documentation gives what you want : pip download

pip download does the same resolution and downloading as pip install, but instead of installing the dependencies, it collects the downloaded distributions into the directory provided

source

So you may try these option with pip download :

pip download -r requirement.txt -d your_directory
like image 141
Alexy Avatar answered Sep 18 '22 22:09

Alexy