srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

SublimeJEDI not showing correct autocompletions #162

Closed nulinspiratie closed 7 years ago

nulinspiratie commented 9 years ago

I've recently installed SublimeJEDI. However, it is not showing me all the autocompletion possibilities (i.e. variables previously declared and functions within the same script).

What I expect SublimeJEDI to do is when, for instance I type: numpy.ar Is that it gives me a list of possible functions of numpy, including array and arange. However I do not see these in the list.

Currently the part of my user settings relevant to python is as follows:

"python_interpreter_path": "C:/Python27/python.exe",
"env":
{
    "PYTHONPATH":"C:/Python27:C:/Python27/Lib/site-packages"
},

The python_interpreter_path was necessary because otherwise it would not find the python interpreter. The part about pythonpath I'm not sure of. I expected this to cause SublimeJEDI to find the right packages, but it does not seem that way.

Am I missing something?

nulinspiratie commented 9 years ago

I tried this on two seperate computers by the way, and both did not work. Is there possibly another configuration setting I should set?

The Sublime Console does not show any errors or warnings by the way

srusskih commented 9 years ago

Hi, Jedi should find all packages from "site-packages" Also you can try to define ""python_package_paths" in the settings (you can find example here https://github.com/srusskih/SublimeJEDI#python-interpreter-settings)

srusskih commented 9 years ago

If some use sublime on windows and could help with the issue, feel free write some advice

sehv commented 9 years ago

Bit late to the party, but I think I can shed some light on this.

Ran into the same problem this morning configuring SublimeJEDI to use a virtualenv instance for one of my projects. For Windows installs, turns out you've gotta use the double-backslash style when setting the interpreter path:

"settings": {
    "python_interpreter": "$project_path\\venv_thetis\\Scripts\\python.exe"
}