Installing pyglfw on OS X

瘦欲@ 提交于 2019-12-20 02:34:16

问题


I want to install glow for python so i runned

    pip3 install glfw

but when i'm trying to import glfw in code i get error like this

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/glfw.py", line 149, in <module>
    raise ImportError("Failed to load GLFW3 shared library.")
    ImportError: Failed to load GLFW3 shared library.

What am I doing wrong?


回答1:


You need to install glfw3 on your system. If you use brew brew install glfw3




回答2:


I had the same problem on Ubuntu 18.04. Installation of libglfw3 and libglfw3-dev solved it.

apt-get install libglfw3
apt-get install libglfw3-dev

I tried to install glfw3 from source first and then install it with brew(as @PanchaGil mentioned above) but it didn't work out for some reason.



来源:https://stackoverflow.com/questions/35645928/installing-pyglfw-on-os-x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!