wiki:MakeLocalPythonRepo

Version 3 (modified by rrhain@bbn.com, 10 years ago) (diff)

--

To create packages necessary for pip installation.

  1. To get the dependencies of a python package to install, the pip version needs to be 1.1 or greater, pip --version

To upgrade: sudo pip install --upgrade pip. But then it might be best to reboot the box. Refer to this page: http://unix.stackexchange.com/questions/36710/how-can-i-upgrade-pip-on-ubuntu-10-04

  1. We generally have an issue with that because the pip that gets installed is version 1.0. Refer to this page: http://stackoverflow.com/questions/7300321/how-to-use-pythons-pip-to-download-and-keep-the-zipped-files-for-a-package
  1. To get the packages and dependencies with pip 1.1 or greater for an example package called celery:
       mkdir ARL-PYTHON
       pip install --download ./ARL-PYTHON celery

  1. Once all the tar files are in that directory, testing of what order the files need to be installed needs to be done. It is best to try this in an Ubuntu VM, since the pip installed on the offline

site will be pip 1.0.

  1. So for flask, this is the order:
cd /home/gram

tar xvzf ARL-PYTHON.tgz  (should get an ARL-PYTHON directory)

pip install ./ARL-PYTHON/Werkzeug-0.9.6.tar.gz
pip install ./ARL-PYTHON/itsdangerous-0.24.tar.gz
pip install ./ARL-PYTHON/Jinja2-2.7.3.tar.gz
pip install ./ARL-PYTHON/Flask-0.10.1.tar.gz