Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Eclipse中为Python配置glfw_Python_Opengl_Glfw - Fatal编程技术网

在Eclipse中为Python配置glfw

在Eclipse中为Python配置glfw,python,opengl,glfw,Python,Opengl,Glfw,我正试图让OpenGL使用Python。我正在使用glfw的python绑定来显示窗口/配置键盘等等 pyglfw的页面有一个包含.pyd文件和dll的下载链接。在页面上,pyglfw包含一组文件夹 我下载了这两个文件,并在Eclipse的“外部库”部分用PyDev引用了它们。我写了一些代码: import glfw glfw.Init(); if (glfw.OpenWindow(800, 600, 5, 6, 5, 0, 8, 0, glfw.FULLSCREEN) != True):

我正试图让OpenGL使用Python。我正在使用glfw的python绑定来显示窗口/配置键盘等等

pyglfw的页面有一个包含.pyd文件和dll的下载链接。在页面上,pyglfw包含一组文件夹

我下载了这两个文件,并在Eclipse的“外部库”部分用PyDev引用了它们。我写了一些代码:

import glfw

glfw.Init();

if (glfw.OpenWindow(800, 600, 5, 6, 5, 0, 8, 0, glfw.FULLSCREEN) != True):
    glfw.Terminate(); # calls glfwTerminate() and exits
    glfw.SetWindowTitle("The GLFW Window");
收到这个错误

Traceback (most recent call last):
  File "C:\Users\Zolani\workspace\PyGLCanvas\main\main.py", line 1, in <module>
    import glfw 
  File "C:\Users\Zolani\Desktop\pyglfw-main\pyglfw-master\glfw\__init__.py", line 395,     in <module>
    raise RuntimeError("no GLFW shared library found")
RuntimeError: no GLFW shared library found
回溯(最近一次呼叫最后一次):
文件“C:\Users\Zolani\workspace\PyGLCanvas\main\main.py”,第1行,在
进口glfw
文件“C:\Users\Zolani\Desktop\pyglfw main\pyglfw master\glfw\\uuuu init\uuuu.py”,第395行,在
引发运行时错误(“未找到GLFW共享库”)
运行时错误:未找到GLFW共享库

我不确定它不能找到什么,它不会运行。如果我在其中一个文件夹中引用了错误的目录,我需要在Eclipse的外部库中引用哪些目录才能找到它所需要的

Python模块必须安装在正确的目录中。通常
$PYTHON/site-packages/…
。然而,为什么要费心手动完成这些工作呢。pyglfw可通过PIP获得

pip install pyglfw
负责下载、构建和安装模块