Download python package with dependencies without installing

£可爱£侵袭症+ 提交于 2019-12-30 00:37:10

问题


I need to download a python package with all its dependencies without installing, sneaker-net it to a computer without connection to the internet, and install it there. For example, I want to install buildbot, lettuce, etc.

The computer is a Windows 7 machine, using Python 2.7. If the package has native extensions, I can build them on the computer.


回答1:


You can use pip, with the --download option, which will download the main package and its dependancies, without installing them.

pip install --download="/path/to/downloaded/files" sneaker-net

And use these files one the local machine with:

pip install --no-index --find-links=<DIR on local machine> sneaker-net

See pip documentation --download for fast & local installs. You can use pip on Windows with cygwin for example.



来源:https://stackoverflow.com/questions/22092927/download-python-package-with-dependencies-without-installing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!