pupil-labs / pyglui

cython powered OpenGL gui that works with glfw
MIT License
29 stars 20 forks source link

Installation on MacOS (Migrated from pupil-labs/pupil/issues/279) #27

Closed willpatera closed 8 years ago

willpatera commented 8 years ago

@csuh0115's original issue below migrated from: https://github.com/pupil-labs/pupil/issues/279


Even after installing glew and cloning https://github.com/pupil-labs/pyglui --recursive, python setup.py install does not work for MacOS. I am having two problems:

missing cimport in module 'pyglui.cygl': pyglui/ui.pyx
missing cimport in module 'pyglui.cygl': pyglui/graph.pyx`

It can't find the gl.h file?

pyglui/ui.c:264:10: fatal error: 'gl.h' file not found
#include "gl.h"
^
1 error generated.
error: command 'clang' failed with exit status 1`
willpatera commented 8 years ago

@csuh0115 - some quick questions/sanity checks:

  1. You installed glew with brew install glew correct? And glew is located at /usr/Local/Cellar/glew correct?
  2. You noted that you cloned recursively as specified in the readme with git clone http://github.com/pupil-labs/pyglui --recursive -- can you confirm that submodules exist in pyglui/ in your local copy? E.g. pyglui/cygl/ and pyglui/pyfontstash/
  3. Could you share your OS version information?

I just tested pyglui installation on my machine MacOS 10.11.2 (El Capitan). I was not able to recreate your issue.

ianoakley commented 8 years ago

Same issue, on OSX 10.11.2, and yes to points 1 and 2, as attached.

screen shot 2016-01-20 at 9 35 40 am
willpatera commented 8 years ago

@ianoakley are your gl headers located in /System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/?

ianoakley commented 8 years ago

Thanks; fixed.

willpatera commented 8 years ago

I'd like to follow up on this before closing. Could you give some feedback on how you made the fix so that others who might see the issue (in the future) could benefit from your work?

ianoakley commented 8 years ago

Reinstalled the Apple Developer Command Line Tools to make sure the headers were in the right place. Not sure why they weren't there in the first place.

willpatera commented 8 years ago

Thanks for the followup - I had a feeling it was related to the command line tools. Pleased that this is resolved. Closing.