{"action":"created","issue":{"url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/536","labels_url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/536/comments","events_url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/536/events","html_url":"https://github.com/davidhalter/jedi-vim/issues/536","id":128365755,"number":536,"title":"How to enable Python 3 support without compiling Python 3 within Vim?","user":{"login":"WoLpH","id":270571,"avatar_url":"https://avatars.githubusercontent.com/u/270571?v=3","gravatar_id":"","url":"https://api.github.com/users/WoLpH","html_url":"https://github.com/WoLpH","followers_url":"https://api.github.com/users/WoLpH/followers","following_url":"https://api.github.com/users/WoLpH/following{/other_user}","gists_url":"https://api.github.com/users/WoLpH/gists{/gist_id}","starred_url":"https://api.github.com/users/WoLpH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WoLpH/subscriptions","organizations_url":"https://api.github.com/users/WoLpH/orgs","repos_url":"https://api.github.com/users/WoLpH/repos","events_url":"https://api.github.com/users/WoLpH/events{/privacy}","received_events_url":"https://api.github.com/users/WoLpH/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-24T01:39:50Z","updated_at":"2016-01-25T15:00:49Z","closed_at":"2016-01-25T01:06:56Z","body":"About half of the time I develop using Python 2 and the other half of the time I develop using Python 3. But it seems that Jedi is unable to understand that even though `/usr/bin/env python` will return in a Python 3 interpreter within those Python 3 virtualenvs and always goes to Python 2 instead.\r\nThe result is that when I do a `<leader>g` I go to the Python 2 version instead of the Python 3 version which can be quite different.\r\n\r\nI've tried forcing Jedi to use Python 3 using this setting:\r\n```\r\nlet g:jedi#force_py_version = 3\r\n```\r\n\r\nBut that results in:\r\n```\r\nError: jedi-vim failed to initialize Python: Could not setup g:jedi#force_py_version: jedi#setup_py_version: Vim(py3file):E319: Sorry, the command is not available in this version: py3file ~/.vim/bun\r\ndle/jedi-vim/initialize.py (in function jedi#init_python[3]..<SNR>98_init_python, line 6)```\r\n```\r\n\r\nSince I run Vim through homebrew (as most OS X developers would), I unfortunately can't build both Python 2 and Python 3 support into Vim. The install options for Vim through homebrew:\r\n```\r\n--disable-nls\r\n\tBuild vim without National Language Support (translated messages, keymaps)\r\n--override-system-vi\r\n\tOverride system vi\r\n--with-client-server\r\n\tEnable client/server mode\r\n--with-lua\r\n\tBuild vim with lua support\r\n--with-luajit\r\n\tBuild with luajit support\r\n--with-mzscheme\r\n\tBuild vim with mzscheme support\r\n--with-python3\r\n\tBuild vim with python3 instead of python[2] support\r\n--with-tcl\r\n\tBuild vim with tcl support\r\n--without-perl\r\n\tBuild vim without perl support\r\n--without-python\r\n\tBuild vim without python support\r\n--without-ruby\r\n\tBuild vim without ruby support\r\n--HEAD\r\n\tInstall HEAD version\r\n```\r\n\r\nIs there any other way to fix this?\r\n\r\nThinking about it, even being able to modify the search path for GotoDefinition would probably fix the issue as well but I don't see an option similar to that anywhere in the docs either."},"comment":{"url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/comments/174533821","html_url":"https://github.com/davidhalter/jedi-vim/issues/536#issuecomment-174533821","issue_url":"https://api.github.com/repos/davidhalter/jedi-vim/issues/536","id":174533821,"user":{"login":"davidhalter","id":748594,"avatar_url":"https://avatars.githubusercontent.com/u/748594?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhalter","html_url":"https://github.com/davidhalter","followers_url":"https://api.github.com/users/davidhalter/followers","following_url":"https://api.github.com/users/davidhalter/following{/other_user}","gists_url":"https://api.github.com/users/davidhalter/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhalter/subscriptions","organizations_url":"https://api.github.com/users/davidhalter/orgs","repos_url":"https://api.github.com/users/davidhalter/repos","events_url":"https://api.github.com/users/davidhalter/events{/privacy}","received_events_url":"https://api.github.com/users/davidhalter/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T15:00:49Z","updated_at":"2016-01-25T15:00:49Z","body":"@WoLpH You can do that by modifying the `sys.path` itself (in pretty much any Jedi version, but the dev/linter heads). If you're on a newer version you have to modify jedi-vim and provide the `sys_path` argument in `jedi.Script`. There's no support in jedi-vim itself, because I'd rather solve the async server issue first (which is connected with this)."}}