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

发布于 2021-01-29 14:10:36

尝试运行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'
关注者
0
被浏览
117
1 个回答
  • 面试哥
    面试哥 2021-01-29
    为面试而生,有面试问题,就找面试哥。

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

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

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



知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看