开发者

An easy way to deploy Django without Internet access?

What I have is development version of intranet site developed with Django and some external libraries placed in virtualenv. It runs fine and I can easily set up virtualenv with the same parameters (using pip) on any computer with internet connection. But, unfortunately it needs to be deployed on computer without :( Any way to deal with this? Thanks in ad开发者_C百科vance.


You can create PIP bundle.

Update: pip bundle has been deprecated, and removed from PIP since version 1.5

With PIP 1.5 you should instead create local cache of the packages.

  1. download packages: pip install --download <DIR> -r requirements.txt
  2. use them: pip install --no-index --find-links=<DIR> -r requirements.txt

Alternative is to use wheel packages:

  1. install wheel if you don't have it already pip install wheel
  2. download packages: pip wheel --wheel-dir=<DIR> -r requirements.txt
  3. use them: pip install --use-wheel --no-index --find-links=<DIR> -r requirements.txt
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜