1. Anthony Tuininga
  2. cx_Freeze
  3. Issues
Issue #4 resolved

Pbm with distutils.util.get_platform on OSX

Olivier Grisel
created an issue

If I freeze a python script with the following lines on OSX 10.6.6 and cx_Freeze 4.2.3:


!/usr/bin/env python

from distutils.util import get_platform print (get_platform()) }}}

I get the following traceback at execution time:

{{{ Traceback (most recent call last): File "/Library/Python/2.6/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module> exec code in m.dict File "/var/folders/VQ/VQbKi1w7F8KNUU4382MrrU+++TI/-Tmp-/tmpW879Pl/scripts/example.py", line 5, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/util.py", line 97, in get_platform cfgvars = get_config_vars() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py", line 525, in get_config_vars func() File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py", line 382, in _init_posix raise DistutilsPlatformError(my_msg) distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /lib/python2.6/config/Makefile (No such file or directory) }}}

Any idea why this is happening?

Comments (2)

  1. Anthony Tuininga repo owner

    That error generally happens when Python is unable to find the files that were used for building Python in the first place. I don't know a great deal about how that is done on the Mac platform so let me suggest that you post to the mailing list with a link to this problem. In addition, some significant changes have been made on the Mac side of things for the upcoming release that may (or may not) have something to do with what you are experiencing. You could try the development version as well and see if that resolves the problem.

  2. Log in to comment