--- Pillow-3.0.0/mp_compile.py.orig 2015-10-01 16:27:09.000000000 +0100 +++ Pillow-3.0.0/mp_compile.py 2015-10-05 23:34:17.226557000 +0100 @@ -2,7 +2,7 @@ # Tested on 2.7, looks to be identical to 3.3. from __future__ import print_function -from multiprocessing import Pool, cpu_count +from multiprocessing import Pool, cpu_count, freeze_support from distutils.ccompiler import CCompiler import os import sys @@ -72,8 +72,10 @@ try: # bug, only enable if we can make a Pool. see issue #790 and # http://stackoverflow.com/questions/6033599/oserror-38-errno-38-with-multiprocessing - pool = Pool(2) - CCompiler.compile = _mp_compile + if __name__ == '__main__': + freeze_support() + pool = Pool(2) + CCompiler.compile = _mp_compile except Exception as msg: print("Exception installing mp_compile, proceeding without:" "%s" % msg)