mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
314 stars 97 forks source link

Fix numpy_formathandler import error #83

Closed Willy-JL closed 2 years ago

Willy-JL commented 2 years ago

When attempting to install from source using a requirements.txt file like this

numpy
git+https://github.com/mcfletch/pyopengl.git
git+https://github.com/mcfletch/pyopengl.git#subdirectory=accelerate

even though numpy is specified before, pip will flat out ignore it and install it afterwards, resulting in the accelerate extension being installed without numpy present and in the end you get the infamous and very annoying message

Unable to load numpy_formathandler accelerator from OpenGL_accelerate

at every OpenGL import, without an easy way to hide it.

This PR simply adds numpy as an install dependency for the accelerate extension to avoid this very annoying issue.

totaam commented 2 years ago

numpy is not required for using the accelerate module, so it should not be a hard install dependency.

Willy-JL commented 2 years ago

It is required if you want to suppress the very annoying Unable to load numpy_formathandler accelerator from OpenGL_accelerate at every import but actually my proposed fix didn't even work, it still required installing numpy separately before hand