0

I downloaded OpenGL in multiple ways, using

conda install pyopengl

Yet, when I try to run my code I am given the error:

OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling

Which refers to the line:

glutInit(sys.argv)

I'm not sure what is going on here. The code worked just fine on my linux computer. Did I install OpenGL in the wrong place?

Edit: I was pointed to this post: Attempt to call an undefined function glutInit. One can download the files separately in a .whl file, and then install it using pip. I am confused because I use anaconda. I am not sure how to work with .whl's as I have not seen them before. I followed the directions of the above link, but to no avail.

McM
  • 471
  • 5
  • 21
  • I find this topic; https://stackoverflow.com/questions/26700719/pyopengl-glutinit-nullfunctionerror I hope it helps, good luck! – Burak Şenol Mar 13 '20 at 21:42
  • This does help. However, in that comment, they install a whl (which I am seeing for the first time) using pip. My main way of using python is through anaconda. Will this cause any problems? It's also not clear to me how to install using pip. Does the file need to be placed in a specific spot? I unfortunately cannot comment on that person's post to ask (reputation too low) – McM Mar 13 '20 at 22:25
  • Is that the entire error message? – AMC Mar 14 '20 at 00:58
  • I uninstalled the pyopengl package, then reinstalled it using 'conda install -c anaconda pyopengl'. Now I get the ModuleNotFoundError: no module named 'OpenGL' – McM Mar 14 '20 at 02:10
  • 1
    I just tried to install vispy. I used conda to do so. Yet, when I try to import from vispy, it tells me that there is no module named vispy. This makes me think that there is something wrong with the path. Any idea what might be going on? – McM Mar 14 '20 at 02:17

0 Answers0