CD-ROM/DVD-ROM/USB drive distribution

23 views
Skip to first unread message

John Graves

unread,
Mar 29, 2010, 4:50:55 PM3/29/10
to The Hitchhiker's Guide to Packaging
I'm struggling to get a read-only distribution of Python + application
code + dependencies to work from a CD-ROM (or DVD-ROM or USB drive).
So far, I've tried 1/ burning a virtualenv instance to the CD-ROM and
2/ adding the python{major}{minor}.dll to the virtualenv instance and
burning that, but I'm getting errors:

ImportError: No module named ConfigParser

ImportError: No module named string

ImportError: No module named subprocess

which suggest I still don't have the right files or the right PATH or
sys.path.

Is there a recipe for this?

I'd be especially interested if someone knows what needs to go on the
disc/USB drive for it to work on a Mac (without admin rights or
install) even when the source was a Windows or ubuntu Linux system.

Thanks,

John Graves

Timothy Allen

unread,
Mar 29, 2010, 7:07:26 PM3/29/10
to packagi...@googlegroups.com
On Mon, 29 Mar 2010 13:50:55 -0700 (PDT)
John Graves <jg0...@gmail.com> wrote:

> I'm struggling to get a read-only distribution of Python + application
> code + dependencies to work from a CD-ROM (or DVD-ROM or USB drive).
> So far, I've tried 1/ burning a virtualenv instance to the CD-ROM and
> 2/ adding the python{major}{minor}.dll to the virtualenv instance and
> burning that, but I'm getting errors:
>
> ImportError: No module named ConfigParser
>
> ImportError: No module named string
>
> ImportError: No module named subprocess

Those (as you probably know) are standard library modules, rather than
installed modules, so they're probably not included in the virtualenv.

Have you considered using one of the various tools designed to create
standalone Python + app installations, such as py2app or py2exe?

> I'd be especially interested if someone knows what needs to go on the
> disc/USB drive for it to work on a Mac (without admin rights or
> install) even when the source was a Windows or ubuntu Linux system.

Mac OS X includes a Python interpreter by default, so if your target
audience is happy with using the terminal, cd'ing to the mounted disc
and running things manually, you should be OK. If you want to use a
different version of Python than what OS X already has, or you want to
use a package that includes C extensions, I don't think there's any easy
way to generate and include binaries for Mac OS X on Linux or Windows.

Jakub Vysoky

unread,
Mar 30, 2010, 7:32:14 AM3/30/10
to packagi...@googlegroups.com
there is a problem with virtualenv symlinking all those system libs
and copying python binary.

so knowing all your dependencies and bundling them to you CDROM
distribution is one problem.

relocatability of virtualenv is the second one. but if you are
interested, you can try my solution for relocatable virtualenv [1]

[1] http://github.com/kvbik/rvirtualenv

cheers.

> To unsubscribe from this group, send email to packaging-guide+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
>

--
Jakub Vysoky

mob: +420 605 852 377
jab: jakub....@gmail.com
icq: 109248375
twit: https://twitter.com/kvbik

Reply all
Reply to author
Forward
0 new messages