小编典典

AttributeError:“模块”对象没有属性“ pydebug”

python

尝试运行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'

阅读 219

收藏
2021-01-20

共1个答案

小编典典

我认为无论您要运行什么,都期望将其与python的特殊调试版本一起使用。sys.pydebug通常在sys模块的标准发行版中找不到,并且我相信如果您构建调试python,它将在那里:

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

这可能也可能是Debian / Ubuntu发行版正在使用的特定构建的一部分。

2021-01-20