Reputation: 4669
I have a Django app that I need to deploy in a local intranet, which doesn't have internet access. I will be bringing over my codebase with a USB key.
Typically, when deploying a Django app, the first thing you do is run pip install -r requirements.txt
to gather all of your dependencies before launch. How can you package up a Django application so that it is entirely self-contained, without requiring pip?
Upvotes: 2
Views: 608
Reputation: 122336
You can install pip without internet access by copying this file first: get-pip.py.
You'll then need to download the packages pip
and setuptools
from PyPI and place them in a local directory called dependencies
. This directory will contain all required .tar.gz
and/or .whl
files.
You can then install pip
by doing:
python get-pip.py --no-index --find-links=dependencies
After that you can install all other dependencies (also in the dependencies
directory) by doing:
pip install --no-index --find-links=dependencies -r requirements
So you can download these separately and copy them along on the USB stick.
Upvotes: 2