1

Assume I built a requirements.txt file like this...

decorator==3.4.0
flup>=1.0.2
Werkzeug==0.9.4
argparse==1.2.1
Mako==0.9.0
Jinja2==2.7.1
Flask==0.10.1
itsdangerous==0.23
WTForms==1.0.5
Flask_WTF==0.9.3

I want to avoid problems with finding specific package versions.

Is there a simple way to stuff all the required packages into a disk archive without downloading them individually from pypi?

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174

1 Answers1

2

You can use the download-cache option in ~/.pip.conf, this will store those packages that you install (their downloaded archives), and you can install from them later:

[global]
default-timeout = 60
respect-virtualenv = true
download-cache = /home/foo/bar/.pip/cache
log-file = /home/foo/bar/.pip/pip.log
build = /home/foo/bar/.pip/build

[install]
use-mirrors = true

You can also create your own pypi server and then maintain your own version of packages.

At work I prefer this option as it allows me to use the standard Python distutils to distribute and install packages which I do not want to put on the global cheese shop.

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284