AttributeError: 'module' 对象没有属性 'pydebug' [英] AttributeError: 'module' object has no attribute 'pydebug'
问题描述
尝试运行 python 脚本时,出现错误 AttributeError: 'module' object has no attribute 'pydebug'
.我使用的是 Python 2.6.
When trying to run a python script, I get the error AttributeError: 'module' object has no attribute 'pydebug'
. I am using 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:
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
这也可能是 Debian/Ubuntu 发行版正在使用的特定构建的一部分.
It is possible that this also might be part of a specific build that Debian/Ubuntu distros are using.
这篇关于AttributeError: 'module' 对象没有属性 'pydebug'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!