Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在我的 mac 上运行 python 脚本。我收到错误消息:-
ImportError:没有名为 opengl.opengl 的模块
我google了一下,发现我缺少pyopengl。我安装了pip。我转到目录pip-1.0然后说
sudo pip install pyopengl
我相信它安装正确,因为我得到了这个
成功安装 pyopengl 清理...
在最后。我重新运行脚本,但仍然遇到同样的错误。有人可以告诉我我可能遗漏了什么吗?谢谢!
它在 Python 路径中吗?也许尝试这样的事情:
import sys sys.path.append(opengl-dir) import opengl.opengl
将 opengl-dir 替换为您安装的目录...也许试试 RocketDonkey 的建议...我不知道,真的...
多谢你们!我想通了。它实际上是一个单独的模块,我需要将它复制到“站点包”位置并且它工作正常。所以总而言之,路径没有问题,只是相应的模块不存在。