You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:AttributeError: module 'glm' 无 'perspective' 属性问题

问题求助:glm模块找不到perspective属性

我不知道发生了什么,我原本以为这段代码可以正常运行,因为它在其他所有电脑上都能正常工作。当前运行环境:pygame 2.5.2 (SDL 2.28.3, Python 3.11.7)。

错误回溯信息:

Traceback (most recent call last):
  File "c:\Users\Dell\Desktop\projects\OPEN3D\main.py", line 40, in <module>
          ^^^^^^^^^^^^^^^^
  File "c:\Users\Dell\Desktop\projects\OPEN3D\main.py", line 19, in __init__
    self.camera = Camera(self)
                  ^^^^^^^^^^^^
  File "c:\Users\Dell\Desktop\projects\OPEN3D\camera.py", line 11, in __init__
    self.m_proj = self.get_projection_matrix()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Users\Dell\Desktop\projects\OPEN3D\camera.py", line 13, in get_projection_matrix
    return glm.perspective(glm.radians(FOV),self.aspect_ratio,Near,Far)
           ^^^^^^^^^^^^^^^
AttributeError: module 'glm' has no attribute 'perspective'
PS C:\Users\Dell\Desktop\projects>  c:; cd 'c:\Users\Dell\Desktop\projects'; & 'c:\Users\Dell\AppData\Local\Microsoft\WindowsApps\python3.11.exe' 'c:\Users\Dell\.vscode\extensions\ms-python.debugpy-2023.3.13341008-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '58277' '--' 'C:\Users\Dell\Desktop\projects\OPEN3D\main.py'

恳请各位帮忙解决此问题。

内容的提问来源于stack exchange,提问作者user23256993

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 04:52:35