Skip to content

can't load the driver (not the usual one) #478

Description

@saflota

Describe the bug
importing the driver causes a load error

To Reproduce
running only this causes the error
pythonimport pycuda.driver
and the error i get is this:

ImportError                               Traceback (most recent call last)
Cell In[21], [line 1](vscode-notebook-cell:?execution_count=21&line=1)
----> [1](vscode-notebook-cell:?execution_count=21&line=1) import pycuda.driver

File c:\Users\mohha\AppData\Local\Programs\Python\Python310\lib\site-packages\pycuda\driver.py:66
     [62](file:///C:/Users/mohha/AppData/Local/Programs/Python/Python310/lib/site-packages/pycuda/driver.py:62) # }}}
     [65](file:///C:/Users/mohha/AppData/Local/Programs/Python/Python310/lib/site-packages/pycuda/driver.py:65) try:
---> [66](file:///C:/Users/mohha/AppData/Local/Programs/Python/Python310/lib/site-packages/pycuda/driver.py:66)     from pycuda._driver import *  # noqa
     [67](file:///C:/Users/mohha/AppData/Local/Programs/Python/Python310/lib/site-packages/pycuda/driver.py:67) except ImportError as e:
     [68](file:///C:/Users/mohha/AppData/Local/Programs/Python/Python310/lib/site-packages/pycuda/driver.py:68)     if "_v2" in str(e):

ImportError: DLL load failed while importing _driver: %1 is not a valid Win32 application.

Environment (please complete the following information):

  • OS: windows 10 pro on x64 intel CPU
  • CUDA version: 8
  • CUDA driver version: 391.35
  • PyCUDA version: the latest 2025.1
  • Python version: 3.10.11

Additional context
i verified that everything is running as an x64 app including (CUDA toolkit, the driver, python) and even pycuda i recompiled it with MSVC for x64 and still that same error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions