Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows Arrayfire C library loading error even after using ctypes to help debug

Aperta
#201 25 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@9prady9 ci sta già lavorando.

Dal 3/2/2019.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

It seems there is a missing DLL problem that prevents Arrayfire from running on a new installed Windows machine.
The Python (3.7.1) is installed through Anaconda, and the Arrayfire binary installation file and Visual C++ Runtime 2015 are also installed. All in x64 version (so not exactly the same as #166).
However, when importing in Python by import arrayfire, I still get the following error

RuntimeError: Could not load any ArrayFire libraries.
Please look at https://github.com/arrayfire/arrayfire-python/wiki for more information.

To distill the cause of the error, I use ctypes to import the arrayfire DLL to see if it is successful, only to find that the DLL file cannot be loaded either

In [2]: import ctypes
In [3]: import os
In [4]: dll_path = r'C:\Program Files\ArrayFire\v3\lib\afcpu.dll'
In [5]: os.path.exists(dll_path)
Out[5]: True
In [6]: ctypes.cdll.LoadLibrary(dll_path)
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-6-97edb3acce44> in <module>
----> 1 ctypes.cdll.LoadLibrary(dll_path)
C:\ProgramData\Anaconda3\lib\ctypes\__init__.py in LoadLibrary(self, name)
    432
    433     def LoadLibrary(self, name):
--> 434         return self._dlltype(name)
    435
    436 cdll = LibraryLoader(CDLL)
C:\ProgramData\Anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    354
    355         if handle is None:
--> 356             self._handle = _dlopen(self._name, mode)
    357         else:
    358             self._handle = handle
OSError: [WinError 126] The specified module could not be found

It seems that a dependent DLL is missing but the error message is not very helpful....

Lingua principale
Python
Stelle
422
Fork
63
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di arrayfire/arrayfire-python

Tutte le issue di arrayfire/arrayfire-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.