arrayfire-python icon indicating copy to clipboard operation
arrayfire-python copied to clipboard

RuntimeError: Could not load any ArrayFire libraries.

Open luckydog1996 opened this issue 3 years ago • 3 comments

Hi, I am using MACOS, I have 1. Download and install binaries 2. pip install arrayfire 3. export DYLD_LIBRARY_PATH=/opt/arrayfire/lib:$DYLD_LIBRARY_PATH

It can be used with command line Screenshot 2020-10-15 at 08 29 41

But when I use the same conda environment and python VeM.py which is a script containing import arrayfire, it shows

Traceback (most recent call last):
  File "/Users/zetao/Documents/code/edu/python_code/first_try/VEM_deblur.py", line 3, in <module>
    import arrayfire as af 
  File "/Users/zetao/opt/anaconda3/lib/python3.7/site-packages/arrayfire/__init__.py", line 56, in <module>
    from .library    import *
  File "/Users/zetao/opt/anaconda3/lib/python3.7/site-packages/arrayfire/library.py", line 643, in <module>
    backend = _clibrary()
  File "/Users/zetao/opt/anaconda3/lib/python3.7/site-packages/arrayfire/library.py", line 619, in __init__
    raise RuntimeError("Could not load any ArrayFire libraries.\n" + more_info_str)
RuntimeError: Could not load any ArrayFire libraries.

Can anyone kindly explain why?

luckydog1996 avatar Oct 15 '20 00:10 luckydog1996

Conda usually includes its own set of C++ and CUDA libraries which maybe different from your system ones. Perhaps arrayfire works with the system libs but not the Conda ones. Try running os.system(/path/to/libafcuda.so) and / or other arrayfire libraries.

pavanky avatar Oct 15 '20 19:10 pavanky

Same issue here, I've tried everything but it won't load them

fuomag9 avatar Nov 08 '20 15:11 fuomag9

Same issue here.

SujithChristopher avatar Dec 20 '22 11:12 SujithChristopher