Search code examples
pythondjangosetup.pydjango-extensions

How do I install django-extensions and its dependancies without ever using the internet?


I am looking to install django-extensions and its dependancies (particularly six) without ever hitting the internet. I have the tarballs for both django-extensions and six, so am able to install offline. However, I see in my logs that pip firsts tries to find six on pypi before checking locally. Instead, I want to force the installer to never check pypi.

Log output (this is before I downloaded the six tarball, so please ignore the local packages error)

Installed /usr/local/lib/python2.7/site-packages/django_extensions-1.2.5-py2.7.egg

Processing dependencies for django-extensions==1.2.5

Searching for six

Reading http://pypi.python.org/simple/six/

Download error: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!

Couldn't find index page for 'six' (maybe misspelled?)

Scanning index of all packages (this may take a while)

Reading http://pypi.python.org/simple/

Download error: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!

No local packages or download links found for six


Solution

  • U may try:

    1) Extract the tarballs and execute python setup.py install in the extracted directories.

    2) Or if u want to use pip insistently, first u must download the pip package: pip install --download /temp_download_dir package_name==version ("==version" is optional) and u may install the pip package with pip install --no-index --find-links /temp_download_dir package_name