arrayfire-python could not find any ArrayFire libraries
gitansh95 opened this issue · comments
I built ArrayFire from source, and installed it in ${HOME}/arrayfire
I am using anaconda3 on Linux Ubuntu 16.04 (64-bit).
I installed arrayfire python bindings from pip
: pip install arrayfire
.
I have followed the instructions mentioned in the arrayfire-python/wiki
export LD_LIBRARY_PATH=${HOME}/arrayfire/lib:$LD_LIBRARY_PATH
When I run python -m arrayfire.tests
,
I get
Traceback (most recent call last):
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/__init__.py", line 56, in <module>
from .library import *
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 601, in <module>
backend = _clibrary()
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 577, in __init__
raise RuntimeError("Could not load any ArrayFire libraries.\n" + more_info_str)
RuntimeError: Could not load any ArrayFire libraries.
Please look at https://github.com/arrayfire/arrayfire-python/wiki for more information.
These are the libraries in ${HOME}/arrayfire/lib
:
gitansh95@computer:~/arrayfire/lib$ ls -l
total 113172
lrwxrwxrwx 1 gitansh95 gitansh95 13 Aug 8 23:41 libafcpu.so -> libafcpu.so.3
lrwxrwxrwx 1 gitansh95 gitansh95 17 Aug 8 23:41 libafcpu.so.3 -> libafcpu.so.3.6.0
-rw-r--r-- 1 gitansh95 gitansh95 37576264 Aug 8 19:37 libafcpu.so.3.6.0
lrwxrwxrwx 1 gitansh95 gitansh95 16 Aug 8 23:41 libafopencl.so -> libafopencl.so.3
lrwxrwxrwx 1 gitansh95 gitansh95 20 Aug 8 23:41 libafopencl.so.3 -> libafopencl.so.3.6.0
-rw-r--r-- 1 gitansh95 gitansh95 67891256 Aug 8 19:19 libafopencl.so.3.6.0
lrwxrwxrwx 1 gitansh95 gitansh95 10 Aug 8 23:41 libaf.so -> libaf.so.3
lrwxrwxrwx 1 gitansh95 gitansh95 14 Aug 8 23:41 libaf.so.3 -> libaf.so.3.6.0
-rw-r--r-- 1 gitansh95 gitansh95 3576680 Aug 8 19:45 libaf.so.3.6.0
lrwxrwxrwx 1 gitansh95 gitansh95 13 Aug 8 23:41 libforge.so -> libforge.so.1
lrwxrwxrwx 1 gitansh95 gitansh95 17 Aug 8 23:41 libforge.so.1 -> libforge.so.1.0.2
-rw-r--r-- 1 gitansh95 gitansh95 6834384 Aug 8 18:24 libforge.so.1.0.2
I also tried export AF_PATH=${HOME}/arrayfire/lib
Did not work.
What am I missing? Please help.
@gitansh95 Are you using anaconda?
Yes, anaconda for Python3.
I have also linked the libstdc++.so
and libstdc++.so.6
in anaconda to /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
:
gitansh95@computer:~$ ls -al anaconda3/lib/libstdc++.so*
lrwxrwxrwx 1 root root 45 Aug 9 12:16 anaconda3/lib/libstdc++.so -> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
lrwxrwxrwx 1 root root 45 Aug 9 12:16 anaconda3/lib/libstdc++.so.6 -> /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
-rwxr-xr-x 2 gitansh95 gitansh95 1055192 Sep 18 2015 anaconda3/lib/libstdc++.so.6.0.19
@gitansh95 can you run ldd ~/arrayfire/lib/libaf.so
and ldd ~/arrayfire/lib/libforge.so
?
gitansh95@computer:~$ ldd ~/arrayfire/lib/libaf.so
linux-vdso.so.1 => (0x00007ffde39ee000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f57952db000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5794f59000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5794c4f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5794a39000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f579481c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5794452000)
/lib64/ld-linux-x86-64.so.2 (0x000055e2f9879000)
gitansh95@computer:~$ ldd ~/arrayfire/lib/libforge.so
linux-vdso.so.1 => (0x00007ffd73980000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f791cfef000)
libglfw.so.3 => /usr/lib/x86_64-linux-gnu/libglfw.so.3 (0x00007f791cdd9000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f791cb67000)
libfreeimage.so.3 => /usr/lib/x86_64-linux-gnu/libfreeimage.so.3 (0x00007f791c8b4000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f791c532000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f791c228000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f791c012000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f791bdf5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f791ba2b000)
/lib64/ld-linux-x86-64.so.2 (0x000055623baf7000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f791b781000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f791b558000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f791b34f000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f791b015000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f791ae0a000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f791ac06000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f791a9f6000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f791a7f0000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f791a5e5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f791a3e1000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f791a1de000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f7919fda000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f7919dd3000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f7919bd0000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f79199a1000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f791978f000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f791958c000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f7919385000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f7919183000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f7918f6a000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f7918d64000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7918b42000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f7918933000)
libjxrglue.so.0 => /usr/lib/x86_64-linux-gnu/libjxrglue.so.0 (0x00007f7918711000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f79184b8000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f791827f000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f791805a000)
libraw.so.15 => /usr/lib/x86_64-linux-gnu/libraw.so.15 (0x00007f7917d9a000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f7917b26000)
libwebpmux.so.1 => /usr/lib/x86_64-linux-gnu/libwebpmux.so.1 (0x00007f791791f000)
libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f79176c3000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f79171f4000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f7916fb1000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f7916d93000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7916b78000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f791696e000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7916769000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7916563000)
libjpegxr.so.0 => /usr/lib/x86_64-linux-gnu/libjpegxr.so.0 (0x00007f791632e000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f79160d7000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f7915e80000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f7915c5d000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f7915a3b000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f791582d000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f7915625000)
@gitansh95 Sorry about missing this. AF_PATH
should point to the root not the lib directory. Can you modify AF_PATH
to only be $HOME/arrayfire
?
Did not work. I tried various combinations of AF_PATH
and LD_LIBRARY_PATH
, unsetting one and setting the other, and setting both together.
gitansh95@computer:~$ echo $AF_PATH
/home/gitansh95/arrayfire
gitansh95@computer:~$ echo $LD_LIBRARY_PATH
/home/gitansh95/arrayfire/lib:/opt/intel/opencl/lib64:
gitansh95@computer:~$ python -m arrayfire.tests
Traceback (most recent call last):
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/__init__.py", line 56, in <module>
from .library import *
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 600, in <module>
backend = _clibrary()
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 576, in __init__
raise RuntimeError("Could not load any ArrayFire libraries.\n" + more_info_str)
RuntimeError: Could not load any ArrayFire libraries.
Please look at https://github.com/arrayfire/arrayfire-python/wiki for more information.
@gitansh95 I don't know what is going on. Try running:
>>> import os
>>> os.system('ldd ~/arrayfire/lib/libaf*.so')
Didn't work. It throws up the same error.
I also tried :
import sys
sys.path.insert(0, "${HOME}/arrayfire")
and
sys.path.insert(0, "${HOME}/arrayfire/lib")
@gitansh95 I wanted to see what the output of the command from previous comment was. Those commands just try to see if the necessary dependencies are found after the python interpreter is started.
Oh. Here is the output :
gitansh95@computer:~$ python -m arrayfire.tests
/home/gitansh95/arrayfire/lib/libaf.so:
linux-vdso.so.1 => (0x00007ffceff82000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb1f39da000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb1f3658000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb1f334e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb1f3138000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb1f2f1b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb1f2b51000)
/lib64/ld-linux-x86-64.so.2 (0x0000564456ac9000)
/home/gitansh95/arrayfire/lib/libafcpu.so:
linux-vdso.so.1 => (0x00007ffd7332d000)
libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f88bb7e4000)
libfftw3.so.3 => /usr/lib/x86_64-linux-gnu/libfftw3.so.3 (0x00007f88bb3e6000)
libfftw3f.so.3 => /usr/lib/x86_64-linux-gnu/libfftw3f.so.3 (0x00007f88bafda000)
libfreeimage.so.3 => /usr/lib/x86_64-linux-gnu/libfreeimage.so.3 (0x00007f88bad27000)
liblapacke.so.3 => /usr/lib/liblapacke.so.3 (0x00007f88ba921000)
libforge.so.1 => /home/gitansh95/arrayfire/lib/libforge.so.1 (0x00007f88ba18f000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f88b9f1e000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f88b9b9c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f88b9892000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f88b967c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f88b92b3000)
/lib64/ld-linux-x86-64.so.2 (0x0000557478586000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f88b9095000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f88b8d6a000)
libjxrglue.so.0 => /usr/lib/x86_64-linux-gnu/libjxrglue.so.0 (0x00007f88b8b49000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f88b88ef000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f88b86b7000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f88b8492000)
libraw.so.15 => /usr/lib/x86_64-linux-gnu/libraw.so.15 (0x00007f88b81d1000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f88b7f5e000)
libwebpmux.so.1 => /usr/lib/x86_64-linux-gnu/libwebpmux.so.1 (0x00007f88b7d57000)
libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f88b7afa000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f88b762c000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f88b73e9000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f88b71ca000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f88b6fb0000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f88b6d4f000)
liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f88b656b000)
libtmglib.so.3 => /usr/lib/libtmglib.so.3 (0x00007f88b6306000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f88b60c3000)
libglfw.so.3 => /usr/lib/x86_64-linux-gnu/libglfw.so.3 (0x00007f88b5eac000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f88b5c83000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f88b5a80000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f88b587c000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f88b5675000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f88b5472000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f88b5243000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f88b5031000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f88b4e2e000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f88b4c27000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f88b4a25000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f88b46eb000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f88b44d1000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f88b42cc000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f88b40aa000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f88b3ea3000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f88b3c94000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f88b3a90000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f88b3850000)
libjpegxr.so.0 => /usr/lib/x86_64-linux-gnu/libjpegxr.so.0 (0x00007f88b361c000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f88b33c4000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f88b316d000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f88b2f4b000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f88b2d28000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f88b2b1a000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f88b2913000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f88b2668000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f88b2460000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f88b2254000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f88b2051000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f88b1e41000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f88b1c36000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f88b1a32000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f88b182b000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f88b1621000)
/home/gitansh95/arrayfire/lib/libafopencl.so:
linux-vdso.so.1 => (0x00007ffe51a3e000)
libOpenCL.so.1 => /opt/intel/opencl/lib64/libOpenCL.so.1 (0x00007f75148a8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7514662000)
libfreeimage.so.3 => /usr/lib/x86_64-linux-gnu/libfreeimage.so.3 (0x00007f75143ae000)
liblapacke.so.3 => /usr/lib/liblapacke.so.3 (0x00007f7513fa8000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f7513d47000)
libforge.so.1 => /home/gitansh95/arrayfire/lib/libforge.so.1 (0x00007f75135b5000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f7513344000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7512fc2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7512cb8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7512aa2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7512885000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f75124bb000)
/lib64/ld-linux-x86-64.so.2 (0x0000559700901000)
libjxrglue.so.0 => /usr/lib/x86_64-linux-gnu/libjxrglue.so.0 (0x00007f751229a000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f7512041000)
libopenjp2.so.7 => /usr/lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007f7511e08000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f7511be3000)
libraw.so.15 => /usr/lib/x86_64-linux-gnu/libraw.so.15 (0x00007f7511923000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f75116af000)
libwebpmux.so.1 => /usr/lib/x86_64-linux-gnu/libwebpmux.so.1 (0x00007f75114a8000)
libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f751124c000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f7510d7d000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f7510b3a000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f751091c000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7510701000)
liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f750ff1e000)
libtmglib.so.3 => /usr/lib/libtmglib.so.3 (0x00007f750fcb9000)
libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f750dc24000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f750d9e1000)
libglfw.so.3 => /usr/lib/x86_64-linux-gnu/libglfw.so.3 (0x00007f750d7cb000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f750d5a1000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f750d39e000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f750d19b000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f750cf93000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f750cd90000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f750cb62000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f750c94f000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f750c74c000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f750c546000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f750c343000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f750c009000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f750bdf0000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f750bbea000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f750b9c8000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f750b7c2000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f750b5b2000)
libjpegxr.so.0 => /usr/lib/x86_64-linux-gnu/libjpegxr.so.0 (0x00007f750b37e000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f750b126000)
liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f750aecf000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f750acad000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f750aa8a000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f750a87c000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f750a675000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f750a349000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f750a09f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7509e96000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f7509c8b000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f7509a88000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f7509877000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f750966d000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7509468000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7509262000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f7509022000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f7508e18000)
Traceback (most recent call last):
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/home/gitansh95/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/__init__.py", line 56, in <module>
from .library import *
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 608, in <module>
backend = _clibrary()
File "/home/gitansh95/anaconda3/lib/python3.6/site-packages/arrayfire/library.py", line 584, in __init__
raise RuntimeError("Could not load any ArrayFire libraries.\n" + more_info_str)
RuntimeError: Could not load any ArrayFire libraries.
Please look at https://github.com/arrayfire/arrayfire-python/wiki for more information.
Just wanted to add that I'm having the same issues Ubuntu 16.04 64-bit on both my laptop (Nvidia discrete graphics and Intel built-in cpu graphics) and my desktop (AMD R9 290). Installed ArrayFire from the Linux install script. I've exported both the appropriate LD_LIBRARY_PATH according to the Wiki and I've exported AF_PATH as well. This is using Anaconda2 (Python 2.7).
Is there a way to have the "RuntimeError: Could not load any ArrayFire libraries." error print out more information for easier debugging? Such as the specific error messages that appear when the library fails to import. I tried running python in verbose mode (-v), but didn't see any extra useful information.
@JohnDN90 are you also using conda ?
Nevermind, I see that you are. The problem is anaconda installs a libstdc++ in its path screwing up anything that wasn't bundled with anaconda.
@gitansh95 @JohnDN90 I pushed a fix to master and devel. I also refreshed the python package that should contain the fix. The issue was with me forgetting to change the major version of forge from 0
to 1
.
@JohnDN90 I also added an environment variable that should allow for easier debugging. Starting with the current release, you can run AF_VERBOSE_LOADS=1 python foo.py
to display the stack traces in case of failures.
@pavanky Thanks for the quick fix. It seems to be working now.
For anyone else who may read this thread while troubleshooting, it seems that Ubuntu 16.04 does not have GLFW3 installed by default. I also had to install it using "sudo apt-get install libglfw3 libglfw3-dev". For those without root access, you'll either have to contact your administrator, compile it yourself, or try using LinuxBrew.