You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ clang2py
Traceback (most recent call last):
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/clang/cindex.py", line 4173, in get_cindex_library
library = cdll.LoadLibrary(self.get_filename())
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/ctypes/init.py", line 460, in LoadLibrary
return self._dlltype(name)
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/ctypes/init.py", line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/muratbal/anaconda3/envs/gst_env/lib/clang: cannot read file data: Is a directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/muratbal/anaconda3/envs/gst_env/bin/clang2py", line 5, in
from ctypeslib.clang2py import main
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/ctypeslib/init.py", line 101, in
if clang_version().split('.')[0] != clang_py_version().split('.')[0]:
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/ctypeslib/init.py", line 56, in clang_version
get_version = cindex.conf.get_cindex_library().clang_getClangVersion
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/clang/cindex.py", line 4178, in get_cindex_library
raise LibclangError(msg)
clang.cindex.LibclangError: /home/muratbal/anaconda3/envs/gst_env/lib/clang: cannot read file data: Is a directory. To provide a path to libclang use Config.set_library_path() or Config.set_library_file().
The text was updated successfully, but these errors were encountered:
I'm not familiar with how anaconda packages libraries. @murat-bal what is your OS ?
What is the content of home/muratbal/anaconda3/envs/gst_env/lib/clang ?
I'll push a generic fix
@murat-bal would you be able to pip install git+https://github.com/trolldbois/ctypeslib.git to see if the patch I pushed fixes your issue ?
it seems that on your platform, the ctypes.util.find_library returns a library folder path, and not a specific filename.
which is possible as per documentation https://docs.python.org/3/library/ctypes.html#finding-shared-libraries
In any conda environment
$ pip install ctypeslib2 clang
$ clang2py
Traceback (most recent call last):
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/clang/cindex.py", line 4173, in get_cindex_library
library = cdll.LoadLibrary(self.get_filename())
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/ctypes/init.py", line 460, in LoadLibrary
return self._dlltype(name)
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/ctypes/init.py", line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/muratbal/anaconda3/envs/gst_env/lib/clang: cannot read file data: Is a directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/muratbal/anaconda3/envs/gst_env/bin/clang2py", line 5, in
from ctypeslib.clang2py import main
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/ctypeslib/init.py", line 101, in
if clang_version().split('.')[0] != clang_py_version().split('.')[0]:
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/ctypeslib/init.py", line 56, in clang_version
get_version = cindex.conf.get_cindex_library().clang_getClangVersion
File "/home/muratbal/anaconda3/envs/gst_env/lib/python3.9/site-packages/clang/cindex.py", line 4178, in get_cindex_library
raise LibclangError(msg)
clang.cindex.LibclangError: /home/muratbal/anaconda3/envs/gst_env/lib/clang: cannot read file data: Is a directory. To provide a path to libclang use Config.set_library_path() or Config.set_library_file().
The text was updated successfully, but these errors were encountered: