[Python-Dev] Single-file Python executables

Donald Stufft donald at stufft.io
Thu May 28 20:36:44 CEST 2015

On May 28, 2015 at 2:33:25 PM, Carl Meyer (carl at oddbird.net) wrote:
> On 05/28/2015 11:52 AM, Paul Moore wrote:
> [snip]
> > Nevertheless, I would like to understand how Unix can manage to have a
> > Python 3.4.3 binary at 4kb. Does that *really* have no external
> > dependencies (other than the C library)? Are we really comparing like
> > with like here?
> I don't know what Donald was looking at, but I'm not seeing anything
> close to that 4k figure here. (Maybe he's on OS X, where framework
> builds have a "stub" executable that just execs the real one?)
> On my Ubuntu Trusty system, the system Python 3.4 executable is 3.9M,
> and the one I compiled myself from source, without any special options,
> is almost 12M. (Not really sure what accounts for that difference -
> Ubuntu system Python uses shared libraries for more stuff?)
> Carl
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/donald%40stufft.io 

The problem is I'm an idiot and did du -h against ``which python``, which of
course resolved to the symlink of python that points to python3.4. The real
executable on my OSX box is 2.6M (built using pyenv).

Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

More information about the Python-Dev mailing list