gpt4 book ai didi

python - 属性错误 : 'module' object has no attribute 'printable'

转载 作者:太空宇宙 更新时间:2023-11-03 15:28:57 25 4
gpt4 key购买 nike

我有这个问题。任何想法?

from OpenGL.raw.GLUT import *
File "/usr/lib/python2.6/site-packages/OpenGL/raw/GLUT/__init__.py", line 6, in <module>
from OpenGL.raw.GLUT.constants import *
File "/usr/lib/python2.6/site-packages/OpenGL/raw/GLUT/constants.py", line 7, in <module>
from OpenGL import platform, arrays
File "/usr/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 36, in <module>
_load()
File "/usr/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 27, in _load
plugin_class = plugin.load()
File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 14, in load
return importByName( self.import_path )
File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 28, in importByName
module = __import__( ".".join(moduleName), {}, {}, moduleName)
File "/usr/lib/python2.6/site-packages/OpenGL/platform/glx.py", line 3, in <module>
from OpenGL.platform import baseplatform, ctypesloader
File "/usr/lib/python2.6/site-packages/OpenGL/platform/baseplatform.py", line 4, in <module>
from OpenGL.platform import ctypesloader
File "/usr/lib/python2.6/site-packages/OpenGL/platform/ctypesloader.py", line 6, in <module>
import ctypes, logging, os
File "/usr/lib/python2.6/logging/__init__.py", line 31, in <module>
import sys, os, types, time, string, cStringIO, traceback
File "string.py", line 3, in <module>
chars=set(string.printable),
AttributeError: 'module' object has no attribute 'printable'

最佳答案

您在当前目录中有一个名为 string.py 的文件。它干扰了同名的标准库模块。重命名 .py 文件,并删除创建的 string.pyc 文件。

关于python - 属性错误 : 'module' object has no attribute 'printable' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2259246/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com