Comments (9)
my guess is that numpy is compiled against different python version
thus jedi cant import it.
could you try #40 ?
from sublimejedi.
I got these import error from sublime console without pull#40 linked above. (I will try the pull/40).
I am using python3, but sublimeJedi seems to import with a python2.7 numpy. not sure if related.
Traceback (most recent call last):
File "./sublime_plugin.py", line 237, in on_query_completions
File "./sublime_jedi.py", line 302, in on_query_completions
completions = self.get_completions(view, locations)
File "./sublime_jedi.py", line 319, in get_completions
completions = self.completions_from_script(script, view) +
File "./sublime_jedi.py", line 214, in completions_from_script
completions = script.completions()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/api_classes.py", line 44, in wrapper
result = func(_args, *_kwds)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/api.py", line 94, in completions
scopes = list(self._prepare_goto(path, True))
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/api.py", line 190, in _prepare_goto
scopes = evaluate.follow_statement(stmt)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/recursion.py", line 31, in call
result = self.func(stmt, _args, *_kwargs)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/cache.py", line 101, in wrapper
rv = function(_args, *_kwargs)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/evaluate.py", line 583, in follow_statement
result = follow_call_list(commands)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/common.py", line 56, in wrapper
return func(_args, *_kwds)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/evaluate.py", line 654, in follow_call_list
result += follow_call(call)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/evaluate.py", line 672, in follow_call
return follow_call_path(path, s.parent, s.start_pos)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/evaluate.py", line 695, in follow_call_path
result = imports.strip_imports(scopes)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 317, in strip_imports
result += ImportPath(s).follow()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 193, in follow
scopes += remove_star_imports(scope)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/cache.py", line 158, in wrapper
mods = func(scope, _args, *_kwargs)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 331, in remove_star_imports
modules = strip_imports(i for i in scope.get_imports() if i.star)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 317, in strip_imports
result += ImportPath(s).follow()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 193, in follow
scopes += remove_star_imports(scope)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/cache.py", line 158, in wrapper
mods = func(scope, _args, *_kwargs)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 331, in remove_star_imports
modules = strip_imports(i for i in scope.get_imports() if i.star)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 317, in strip_imports
result += ImportPath(s).follow()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 193, in follow
scopes += remove_star_imports(scope)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/cache.py", line 158, in wrapper
mods = func(scope, _args, *_kwargs)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 331, in remove_star_imports
modules = strip_imports(i for i in scope.get_imports() if i.star)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 317, in strip_imports
result += ImportPath(s).follow()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 186, in follow
scope, rest = self._follow_file_system()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/imports.py", line 306, in _follow_file_system
return f.parser.module, rest
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/modules.py", line 48, in parser
or self._load_module()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/modules.py", line 55, in _load_module
source = self._get_source()
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/builtin.py", line 124, in _get_source
return _generate_code(self.module, self._load_mixins())
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/builtin.py", line 119, in module
load_module(name, path)
File "/Users/chen/Library/Application Support/Sublime Text 2/Packages/SublimeJEDI-0.6.1/jedi/builtin.py", line 90, in load_module
exec_function('import %s as module' % name, content)
File "blub", line 2, in exec_function
File "", line 1, in
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/init.py", line 137, in
import add_newdocs
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/add_newdocs.py", line 9, in
from numpy.lib import add_newdoc
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/init.py", line 4, in
from type_check import *
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/type_check.py", line 8, in
import numpy.core.numeric as _nx
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/init.py", line 5, in
import multiarray
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so, 2): Symbol not found: _PyCapsule_Import
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so
Expected in: flat namespace
in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/multiarray.so
from sublimejedi.
It seems Sublimetext has its own version of python interpreter. that might creates all sorts of issues for numpy. I'll test the new hope :)
from sublimejedi.
Hi.
You guys right. Jedi use Sublime python interpreter but sys path from "custom" environment. Thats my we have this troubles with numpy now and in future.
#40 looks promising. But PR still contains lots of changes for plugin code, and i don't like it. I'll write my thoughts in PR soon.
from sublimejedi.
#40 is working for me, just a little slow for the completion to show up. But otherwise seems fine.
from sublimejedi.
For all packages completion is slow or only for numpy ?
from sublimejedi.
For all packages.
from sublimejedi.
Sounds like a trouble...
from sublimejedi.
Strange, but I can not see a slow access, when I working out with python projects
from sublimejedi.
Related Issues (20)
- Nothing happen and no error reported HOT 2
- Additional closing brace in signature popup
- Definition.params is therefore deprecated.
- Signature.to_string() to format call signatures.
- left parentheses does not work HOT 3
- SublimeJEDI doesn't work after install HOT 3
- Fix simple typo: utitilies. -> utilities. HOT 1
- Do not autosuggest packages with dashes in names HOT 3
- Absent `__init__.py` breaks autocomplete and goto functionality. HOT 6
- Setting custom "python_interpreter" in sublime_jedi.sublime_settings does not work in portable python setup.
- Param completion not working HOT 1
- Add "pymdownx" and "pyyaml" in dependencies
- Autocomplete with version 0.18.0 is slower than previous version
- Fix a small error ) HOT 4
- Last version SublimeJEDI dont work on Windows. Cause: jedi version >0.16.0 runtime error for Windows. HOT 3
- Lookup Error, Could not get version information for 'python' HOT 2
- It's does not give priority to sublime default auto complete suggestions
- Inconsistent completed parentheses depending on auto_match_enabled
- Is the project still alive? HOT 3
- Trailing colon breaks function insertion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sublimejedi.