No module named 'clang' in python3
See original GitHub issueI’ve followed the instructions, and installed the packages ‘clang’ and ‘python-clang-3.4’ (Ubuntu 14.04). But it seems like I’ve missed something because the plugin fails to find ‘clang’ python bindings.
The error I get in Sublime’s console is:
INFO:EasyClangComplete.EasyClangComplete: init completer based on libclang
INFO:EasyClangComplete.plugin.completion.base_complete: Getting version from command: `clang++ --version`
INFO:EasyClangComplete.plugin.completion.base_complete: Found clang version: 3.4
WARNING:EasyClangComplete.plugin.completion.lib_complete: cannot get default cindex with error: No module named 'clang'
WARNING:EasyClangComplete.plugin.completion.lib_complete: using bundled one: EasyClangComplete.clang.cindex34
However, i’m able to import the allegedly missing library manually when executing python interpreter from the terminal. I’m pretty sure it is due to the fact that Sublime runs python3, and the python bindings are installed under /usr/lib/python2.7/dist-packages/clang/… I tried to find an official python3 package for the python bindings without success.
The README file of this plugin states that the python bindings are working fine on Ubuntu, so I’m pretty sure i did something wrong. Can you give me a hand?
Thanks ahead
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Related StackOverflow Question
Yay! I am happy to hear this! This is exactly the reason why I have created it!
Anyway, I guess it is impossible to run the plugin with default python bindings as they are python 2 only (which drives me nuts) while sublime text now uses python 3. The ones I provide have been changed to run with python 3. If they work for many people I may try to push them upstream (but there are already attempts that don’t get much attention)
Regarding the warning message I should probably not even try to find the system installed bindings and just use mine.
I will close this issue for now.
I have opened another issue #39 to remove the confusing warning and will do it sometime during the week.