-
Notifications
You must be signed in to change notification settings - Fork 0
No Module named Clang #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Strange, you got a exception in a try block... # try:
# from clang.cindex import TranslationUnit
# # use customized clang python bindings
# except:
# from clangHelper.tools.libclang_version import get_libclang_version
# if get_libclang_version() == '32':
# from clangHelper.clang.cindex32 import TranslationUnit
# if get_libclang_version() == '33':
# from clangHelper.clang.cindex33 import TranslationUnit
# if get_libclang_version() == '34':
# from clangHelper.clang.cindex34 import TranslationUnit
# if get_libclang_version() == '35':
# from clangHelper.clang.cindex35 import TranslationUnit
# if get_libclang_version() == '36':
from clangHelper.clang.cindex36 import TranslationUnit
# elif get_libclang_version() == '37':
# from clangHelper.clang.cindex37 import TranslationUnit
# if get_libclang_version() == '38':
# from clangHelper.clang.cindex38 import TranslationUnit and then report back please. Thanks. |
Another thing, your system is 64bits right? ST and LLVM are too? Or is LLVM 32bits for example? |
run this on your sublime console and send the results back, please: import sublime; from sys import version; from platform import platform; from struct import calcsize; print('Sublime:'); print('\tversion:', sublime.version()); print('\tplatform:', sublime.platform()); print('\tarch:', sublime.arch()); print('python:'); print('\tversion:', version); print('\tplatform:', platform()); print('\tarch:', 8 * calcsize("P")) |
I was using a 32 bit version of clang (the only binaries for 3.6.2 are 32 bit). I've since installed the 64 bit version of 3.7.1. I'll post the results of the other 2 suggestions shortly. |
Sublime: I'm getting closer. After commenting out the lines you suggested, the plugin does load. But, when attempting to do a completion, an error dialog popped up. I can't get it to do it now. What I get in the console is: Traceback (most recent call last): |
ok, your first error was because the 32bits LLVM! ctypes, the lib used by python to load LLVM, can't load libs if the architecture mismatch... but now you have an error in my code, you probably found a bug... |
Another test would be to right click the view and select 'clangHelper' -> 'Clear all settings on this view', then close and reopen Sublime itself. |
I am running ST3 build 3095 on Windows 10 with LLVM 3.6.1. When I load up ST3, I get the following error in the console:
reloading plugin clangHelper.codeCompletion
Traceback (most recent call last):
File "C:\Users\Nathan\AppData\Roaming\Sublime Text 3\Packages\clangHelper\codeCompletion.py", line 15, in
from clang.cindex import TranslationUnit
ImportError: No module named 'clang'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 74, in reload_plugin
m = importlib.import_module(modulename)
File "./importlib/init.py", line 90, in import_module
File "", line 1584, in _gcd_import
File "", line 1565, in _find_and_load
File "", line 1532, in _find_and_load_unlocked
File "", line 584, in _check_name_wrapper
File "", line 1022, in load_module
File "", line 1003, in load_module
File "", line 560, in module_for_loader_wrapper
File "", line 868, in _load_module
File "", line 313, in _call_with_frames_removed
File "C:\Users\Nathan\AppData\Roaming\Sublime Text 3\Packages\clangHelper\codeCompletion.py", line 19, in
if get_libclang_version() == '32':
File "C:\Users\Nathan\AppData\Roaming\Sublime Text 3\Packages\clangHelper\tools\libclang_version.py", line 19, in get_libclang_version
lib = CDLL(lib_file)
File "./ctypes/init.py", line 353, in init
OSError: [WinError 193] %1 is not a valid Win32 application
The text was updated successfully, but these errors were encountered: