srusskih / SublimeJEDI

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

Setting custom "python_interpreter" in sublime_jedi.sublime_settings does not work in portable python setup. #317

Open dhekabai opened 4 years ago

dhekabai commented 4 years ago

I have installed a portable python (zip package version) and portable version of Sublime Text on a USB drive, and with a custom build system it seems to work with the portable python just file as follows:

"cmd": ["\Python\python.exe", "$file"],

I have also Installed the jedi plugin, and no matter what it doesn't seem to work with my portable python version (downloaded from https://www.python.org/downloads/windows/, listed as "Download Windows x86-64 embeddable zip file".

I have changed the sublime_jedi.sublime_settings file as follows:

// You can set a path to your python interpreter, // for example /home/user/.virtualenvs/myenv/bin/python). "python_interpreter": "\Python\python.exe"

but jedi features do not work. as soon as I install python to PATH it works just fine, but setting the python interpreter to the portable python option doesn't seem to work.

I have also tried placing the python folder in $packages and using the variable name in the settings. Sublime python building seems to work using that as a build path but Jedi refuses to work. Clicking any action seems to do nothing at all. To clarify, a normal installation of python and added to PATH, seems to work.

I am a beginner to python and use a couple different computers to learn python and it is necessary for me to have a portable python + sublime setup with autocomplete to work. and it seems possible since the option exists but it doesn't work.

Here is the output in SublimeText console: https://pastebin.com/FeKSWYgX