Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 advance.

like image 784
evgeniuz Avatar asked Sep 20 '25 19:09

evgeniuz


1 Answers

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
like image 55
vartec Avatar answered Sep 22 '25 08:09

vartec