Skip to content

expand on why discourage the use of system Python #747

tshepang opened this Issue Dec 29, 2012 · 3 comments

2 participants


Please explain the claim made here:

often the “system” Python is compiled with options that aren’t optimal for web development.

Pylons Project member
mcdonc commented Jan 3, 2013

The one concrete thing is that often the system Python is compiled with UCS4 Unicode, which basically takes up 2X the number of bytes for each character in a string, and as far as I understand it, is only really needed for some Chinese character sets. That explanation may be technically wrong (not sure about exactly which character sets need UCS4), but there is definitely a difference between UCS2 and UCS4 builds of Python as far as process size goes, and most system builds do build with UCS4 because they ship to countries which use those charsets.

But also, more practically, often system builds are just compiled plain weird. Sometimes they'll be compiled as a shared library build so they can be useful under mod_wsgi, and that makes compiling things under them "normally" hard sometimes. And sometimes they have lots of extraneous things on the PYTHONPATH that cause bizarre stuff to happen if you (unwisely) choose not to use a virtualenv (take a look at sys.path in an Ubuntu build sometime for an example).

Personally, I just like to avoid all of this myself and build Python from source. I realize, however, that this is a daunting task for people who aren't as invested in the system as I am.

tshepang commented Jan 3, 2013

Does PEP 393 take care of the first issue?

Pylons Project member
mcdonc commented Jan 3, 2013

It indeed does! But it will be a long time before everyone is using Python 3.3.

@tshepang tshepang closed this Jan 3, 2013
@tshepang tshepang reopened this Jan 3, 2013
@mcdonc mcdonc pushed a commit that closed this issue Jan 18, 2013
@tshepang tshepang fix #747 b31e5c9
@mcdonc mcdonc closed this in b31e5c9 Jan 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.