Difference between revisions of "Notes on disconnected (offline) (air-gapped) networks"
From Simson Garfinkel
Jump to navigationJump to search
(Created page with "Python modules: * https://stackoverflow.com/questions/11147667/is-there-a-way-to-list-pip-dependencies-requirements Download all of the python modules with pip download [pa...") |
m |
||
(9 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Download all of the python modules with | Download all of the python modules with | ||
pip download [package] -d /tmp --no-binary :all: | pip wheel [package] -w /tmp | ||
or: | |||
pip download [package] -d /tmp --no-binary :all: | |||
Problem: you are on MacOS running Python 3.9 but need to download linux x86 for Python 3.6: | |||
pip3 download -d . --python-version 36 --abi cp36 --platform linux_x86_64 --no-deps lxml | |||
Note that this still builds the module (to get the metadata). To avoid building ([https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/4651/7 discussion]), specify: | |||
--no-deps --no-binary :all: --no-build-isolation pandas | |||
This would be a good time to read [https://pip.pypa.io/en/stable/reference/pip_download/ the pip download documentation]. | |||
Problem: You need to trace Python3 dependencies. | |||
Solution use johnnydep, which is available on pypi: | |||
[[File:Johnnydep demo.png|Johnnydep demo]] |
Latest revision as of 10:33, 16 October 2020
Python modules:
Download all of the python modules with
pip wheel [package] -w /tmp
or:
pip download [package] -d /tmp --no-binary :all:
Problem: you are on MacOS running Python 3.9 but need to download linux x86 for Python 3.6:
pip3 download -d . --python-version 36 --abi cp36 --platform linux_x86_64 --no-deps lxml
Note that this still builds the module (to get the metadata). To avoid building (discussion), specify:
--no-deps --no-binary :all: --no-build-isolation pandas
This would be a good time to read the pip download documentation.
Problem: You need to trace Python3 dependencies.
Solution use johnnydep, which is available on pypi: