AttributeError: 'module' object has no attribute 'pydebug'

python, python-2.6

Solution

I think whatever you are trying to run is expecting to be used with a special debug build of python. `sys.pydebug` is not normally found on the standard release of the sys module, and I believe it would be there if you built a debug python:

http://docs.python.org/c-api/intro.html#debugging-builds

It is possible that this also might be part of a specific build that Debian/Ubuntu distros are using.

Problem

When trying to run a python script, I get the error `AttributeError: 'module' object has no attribute 'pydebug'`. I am using Python 2.6. Full error: ``` File "/lib/python2.6/distutils/sysconfig.py", line 238, in get_makefile_filename return os.path.join(lib_dir, "config" + (sys.pydebug and "_d" or ""), "Makefile") AttributeError: 'module' object has no attribute 'pydebug' ```

Original source