Why can't this python script find the libclang dll?

走远了吗. 提交于 2019-12-01 22:57:28

@SK-logic commented that I should check whether both Python and libclang are either 32bit or 64bit. Libclang was 32bit, but I couldn't find a way to check whether my Python installation is 32 or 64, so I reinstalled the 32bit version, and now it works. So the problem probably was that I had the 64 bit version of Python.

I was running into a similar problem (Windows 7 x64, Anaconda3 x64). Using

clang.cindex.Config.set_library_file('C:/Program Files/LLVM/bin/libclang.dll')

fixed the problem. Please note that you need to use slashes (not antislashes), and specify path to bin/libclang.dll (not to lib/libclang.dll).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!