srusskih / SublimeJEDI

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

v0.12.1 error about virtualenv or interpreter #255

Closed walkinrain2008 closed 6 years ago

walkinrain2008 commented 6 years ago

My Python is green directory structure: D:\Python3\python.exe

settings-User: "python_virtualenv": "D:\Python3\", "python_interpreter": "D:\Python3\", "python_package_paths": [ "D:\Python3\Lib\", "D:\Python3\libs\", "D:\Python3\Lib\site-packages\", "."],

error info: Traceback (most recent call last): File "D:\GreenApp\Program\SublimeText3\sublime_plugin.py", line 591, in on_query_completions res = callback.on_query_completions(v, prefix, locations) File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\completion.py", line 178, in on_query_completions ask_daemon(view, self._show_completions, 'autocomplete', locations[0]) File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\utils.py", line 34, in ask_daemon DAEMONS[window_id] = Daemon(settings=get_settings(view)) File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\sublime_jedi\utils.py", line 73, in init safe=False) File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\dependencies\jedi\api\environment.py", line 295, in create_environment return Environment(path, _get_executable_path(path, safe=safe)) File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\dependencies\jedi\api\environment.py", line 309, in _get_executable_path raise InvalidPythonEnvironment("%s seems to be missing." % python) jedi.api.environment.InvalidPythonEnvironment: D:\Python3\Scripts\python.exe seems to be missing.

============================================ now i replace python = os.path.join(path, 'Scripts', 'python.exe') to python = os.path.join(path, '', 'python.exe')

jedi is correct. Is there another strategy that might work better??

srusskih commented 6 years ago

@walkinrain2008 hi. sorry for lot response. try set up only interpreter path is you do not use virtualenv.

walkinrain2008 commented 6 years ago

@srusskih thank you! my settings-User only set interpreter: "python_interpreter": "D:\Python3\python.exe"

jedi is correct.

======================================= but, i look readme.md your setting for interpreter is path! if i set "python_interpreter": "D:\Python3\" or "python_interpreter": "D:\Python3"

error info: File "D:\GreenApp\Program\SublimeText3\Data\Packages\Jedi - Python autocompletion\dependencies\jedi\api\environment.py", line 82, in _get_version "Could not get version information: %r" % exc) jedi.api.environment.InvalidPythonEnvironment: Could not get version information: PermissionError(13, '拒绝访问。', None, 5)

is it a issues?

edelvalle commented 6 years ago

@walkinrain2008 In your case python_interpreter should be set to: "D:\Python3\python.exe"

srusskih commented 6 years ago

@walkinrain2008 thanks for a feed back. one more reason to update docs :)