On Wed, Nov 21, 2012 at 4:21 AM, Philipp Hagemeister <phihag@phihag.de> wrote:
Currently, there are the following methods for installing dependencies:

· Use the distribution's packaging (ignored here, all further points
refer to setup.py/distutils)
· Install them system-wide (default). This requires superuser rights and
is basically guaranteed to conflict with some other application,
especially if applications are choosy about the versions of Python
packages they like.
· Install them user-wide (--user), with pretty much the same downsides,
plus that the application is now bound to the user installing it.
· Manually invoke distutils with another path (error-prone and
non-standard).
· Give up and use virtualenv. While this works fine, it's a little bit
heavy-handed to modify one's shell just to launch a potentially trivial
application.

Or install them all in a single directory, add a __main__.py file to that directory and then just pass that directory name on the command line instead of a script name. The directory will be added as sys.path[0] and the __main__.py file will be executed as the main module (If your additional application dependencies are all pure Python files, you can even zip up that directory and pass that on the command line instead). This approach has been supported since at least Python 2.6, but was missing from the original What's New, and nobody ever goes back to read the "using" documentation on the website because they assume they already know how invoking the interpreter works.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan@gmail.com   |   Brisbane, Australia