Open Leterax opened 3 years ago
If i just try to import import pycuda.gl as cuda_gl
It tells me PyCUDA was compiled without GL extension support
Do i have to build from source to enable GL?
This seems to have something to do with #213. The suggested fix of adding CUDA_PATH to the dll directory seems to work. Maybe pycuda can do this automatically?
Maybe pycuda can do this automatically?
It certainly tries to:
Could you investigate what's happening with that code on your system?
This seems to be a problem with the order in which things are executed. When you call
from pycuda.gl import autoinit
it will first call the init.py file, before anything else! init.py tries to import this:
import pycuda._driver as _drv
however since neither autoinit from pycuda nor autoinit from pycuda.gl have run it fails. Either by calling
from pycuda import autoinit
or calling _add_cuda_libdir_to_dll_path
in __init__.py
this would probably be fixed.
Working example here:
>>> import moderngl
>>> ctx = moderngl.create_standalone_context()
>>> from pycuda import autoinit
>>> from pycuda.gl import autoinit
>>>
I ran into the same issue today. Can pycuda import autoinit by default?
I'm trying to do some interop between pycuda and OpenGL, however, if I try to create a context using
import pycuda.gl.autoinit
It fails with this error message:System specs:
Windows 10, Python 3.9 Newest Nvidia drivers.
Cuda added itself to PATH, CUDA_PATH, and CUDA_PATH_V11_2