Nick T
Nick T

Reputation: 26717

How can I batch several Python package installers?

I want to have users install Python and several packages generated using distutil's bdist_wininst option (python setup.py bdist_wininst). Are there command-line options for the installers so I can batch them all together? None of /help, /?, --help, -h turn up any useful information, nor the build instructions on Python's docs.

In absence of any command-line switches on the installers, what are some alternatives to distribute Python with a bunch of packages? Canopy seems interesting, but it lacks a few essentials.

Upvotes: 1

Views: 327

Answers (1)

user590028
user590028

Reputation: 11730

Once you have python installed, you can use it to install the required components. Start simple and build:

import subprocess
pkgs = ['ipaddr', 'sqlalchemy', 'ipython',]

for pkg in pkgs:
    subprocess.call(['pip', 'install', pkg])

Upvotes: 1

Related Questions