AttributeError:“模块”对象没有属性“ pydebug”
尝试运行python脚本时,出现错误AttributeError: 'module' object has no attribute
'pydebug'
。我正在使用Python 2.6。
完整错误:
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'
-
我认为无论您要运行什么,都期望将其与python的特殊调试版本一起使用。
sys.pydebug
通常在sys模块的标准发行版中找不到,并且我相信如果您构建调试python,它将在那里:http://docs.python.org/c-api/intro.html#debugging-
builds这可能也可能是Debian / Ubuntu发行版正在使用的特定构建的一部分。