How to install packages offline?

后端 未结 10 891
一个人的身影
一个人的身影 2020-11-22 00:38

What\'s the best way to download a python package and it\'s dependencies from pypi for offline installation on another machine? Is there any easy way to do this with pip or

10条回答
  •  悲哀的现实
    2020-11-22 01:05

    The pip download command lets you download packages without installing them:

    pip download -r requirements.txt

    (In previous versions of pip, this was spelled pip install --download -r requirements.txt.)

    Then you can use pip install --no-index --find-links /path/to/download/dir/ -r requirements.txt to install those downloaded sdists, without accessing the network.

提交回复
热议问题