如何在 mac 中安装 PyGLEW?

How to install PyGLEW in mac?

我从 this site 下载了 PyGLEW 以使用 PyGPU。但是不知道怎么安装。

我尝试用通常的技术安装它。但是没有成功。

$ sudo python setup.py install
running install
running build
running install_data
error: can't copy 'pyglew.so': doesn't exist or not a regular file

我也无法通过 pip 安装它

sudo pip install pyglew
...
No matching distribution found for pyglew

还有其他安装 PyGLEW 的方法吗?

您的当前目录应该是下载的文件夹。导航到此目录后,运行 python setup.py build 后跟 python setup.py install.