Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my jedi-vim can't show package from python3 #857

Closed
yangsoon opened this issue Jul 27, 2018 · 16 comments
Closed

my jedi-vim can't show package from python3 #857

yangsoon opened this issue Jul 27, 2018 · 16 comments

Comments

@yangsoon
Copy link

Issue

my jedi-vim can't show the package like asyncio etc in python3 and the package install used by pip3
my os is MacOS

Steps to reproduce

Output of “:verbose JediDebugInfo”

Jedi-vim debug information

Using Python version: 3

  • global sys.version: 3.6.5 (default, Jun 17 2018, 12:13:06), [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
  • global site module: /usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py
    Jedi path: /Users/yangs/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/pythonx/jedi/jedi/__init__.py
  • version: 0.12.1
  • environment: <Environment: 3.6.5 in /usr/local>
  • sys_path:
    • /usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
    • /usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6
    • /usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
    • /Users/yangs/Library/Python/3.6/lib/python/site-packages
    • /usr/local/lib/python3.6/site-packages
    • /usr/local/lib/python3.6/site-packages/pip-9.0.1-py3.6.egg
  • jedi-vim git version: 0.9.0-45-g9a4a4f4
  • jedi git submodule status: a79a1fbef57564d031c59f47def20a6d9adf3439 pythonx/jedi (v0.12.1)
  • parso git submodule status: e6bc924fbabbfa3090044e475c91a7655b9c6e9b pythonx/parso (v0.3.1)
Settings
g:jedi#use_tag_stack = 0 (default: 1)
g:jedi#force_py_version = 3 (default: 'auto')
g:jedi#popup_select_first = 0 (default: 1)
g:jedi#use_splits_not_buffers = 'right' (default: 1)
g:jedi#usages_command = '<Leader>n' (default: '<leader>n')
g:jedi#completions_command = '' (default: '<C-Space>')
g:jedi#rename_command = '<Leader>r' (default: '<leader>r')
g:jedi#auto_vim_configuration = 0 (default: 1)
g:jedi#max_doc_height = 100 (default: 30)
g:jedi#smart_auto_mappings = 0 (default: 1)
g:jedi#goto_command = '<C-]>' (default: '<leader>d')
g:jedi#completions_enabled = 0 (default: 1)

:version

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBU
G -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fst
ack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNI
BI_HAS_VAR_FROM -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/config -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/s
rc -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/sr
c/nvim/auto -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/include
编译者 [email protected]

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

     系统 vimrc 文件: "$VIM/sysinit.vim"
         $VIM 预设值: "/usr/local/Cellar/neovim/0.3.1/share/nvim"

Run :checkhealth for more info

:messages

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBU
G -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fst
ack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNI
BI_HAS_VAR_FROM -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/config -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/s
rc -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/sr
c/nvim/auto -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/include
@yangsoon
Copy link
Author

the jedi complete use the package in my python2.7 not python3

@blueyed
Copy link
Collaborator

blueyed commented Jul 27, 2018

environment: <Environment: 3.6.5 in /usr/local>

I would assume it uses this one?!

But its sys_path looks strange:

/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python36.zip

Is that the same Python environment?

What does :py3 print(jedi_vim.get_environment().executable) display?

There is some WIP to improve selecting an environment, you might want to try it maybe: #836

@yangsoon
Copy link
Author

the result of

:py3 print(jedi_vim.get_environment().executable)

was

/usr/local/bin/python3

thanks

@blueyed
Copy link
Collaborator

blueyed commented Jul 27, 2018

And if you run /usr/local/bin/python3 in a shell, what does import sys; print(sys.path) give you?

Is Cellar the MacOS Python?

What does which pip3 and pip3 --version display?

the jedi complete use the package in my python2.7 not python3

I cannot see anything about Python 2.7 here, so I would rather guess that you have multiple Python 3 versions that get mixed.

@yangsoon
Copy link
Author

when i run import sys; print(sys.path)
the results were

['', '/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Users/yangs/Library/Python/3.6/lib/python/site-packages', '/usr/local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages/pip-9.0.1-py3.6.egg']

which pip3

/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/bin/pip3

pip3 --version

pip 9.0.1 from /usr/local/lib/python3.6/site-packages/pip-9.0.1-py3.6.egg (python 3.6)

I got it .maybe I have multiple Python 3 versions that get mixed.

@blueyed
Copy link
Collaborator

blueyed commented Jul 27, 2018

So it looks like jedi-vim uses this environment indeed.

Does pip3 freeze include asyncio?
What does python -c 'import asyncio, inspect; print(inspect.getfile(asyncio))' say?

@yangsoon
Copy link
Author

I think you mean python3 -c 'import asyncio, inspect; print(inspect.getfile(asyncio))'

/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/__init__.py

I just change python3.6 to python3.7 but also no use

@davidhalter
Copy link
Owner

Can you give us a bit better reproduction steps? I'm still not sure what your problem is.

@yangsoon
Copy link
Author

sorry I used this vim-config to config my neovim, but the jedi can't
complete the python3, some package in python3 can't be completed, just like asyncio etc, the behavior of jedi seemd like complete python2.7 because some packeage install by pip2 was completed.

  1. :py3 print(jedi_vim.get_environment().executable)
py3 print(jedi_vim.get_environment().executable)
  1. py3 import sys; print(sys.path)
3. `python3 -c 'import asyncio, inspect; print(inspect.getfile(asyncio))'`

/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/init.py

['/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.0/Frame
works/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/p
ython3.7/lib-dynload', '/Users/yangs/Library/Python/3.7/lib/python/site-packages', '/usr/local/lib/python3.7/site-packages', '_vim
_path_']

image

Output of “:verbose JediDebugInfo”

Jedi-vim debug information

Using Python version: 3

  • global sys.version: 3.7.0 (default, Jul 23 2018, 20:22:55), [Clang 9.1.0 (clang-902.0.39.2)]
  • global site module: /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site.py
    Jedi path: /Users/yangs/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/pythonx/jedi/jedi/__init__.py
  • version: 0.12.1
  • environment: <Environment: 3.7.0 in /usr/local>
  • sys_path:
    • /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python37.zip
    • /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7
    • /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload
    • /Users/yangs/Library/Python/3.7/lib/python/site-packages
    • /usr/local/lib/python3.7/site-packages
  • jedi-vim git version: 0.9.0-46-g40fc5ab
  • jedi git submodule status: a79a1fbef57564d031c59f47def20a6d9adf3439 pythonx/jedi (v0.12.1)
  • parso git submodule status: e6bc924fbabbfa3090044e475c91a7655b9c6e9b pythonx/parso (v0.3.1)
Settings
g:jedi#use_tag_stack = 0 (default: 1)
g:jedi#force_py_version = 3 (default: 'auto')
g:jedi#popup_select_first = 0 (default: 1)
g:jedi#use_splits_not_buffers = 'right' (default: 1)
g:jedi#usages_command = '<Leader>n' (default: '<leader>n')
g:jedi#completions_command = '' (default: '<C-Space>')
g:jedi#rename_command = '<Leader>r' (default: '<leader>r')
g:jedi#auto_vim_configuration = 0 (default: 1)
g:jedi#max_doc_height = 100 (default: 30)
g:jedi#smart_auto_mappings = 0 (default: 1)
g:jedi#goto_command = '<C-]>' (default: '<leader>d')
g:jedi#completions_enabled = 0 (default: 1)

  omnifunc=
        最近修改于 ~/.cache/vim/dein/repos/github.com/Shougo/dein.vim/autoload/dein/util.vim
  completeopt=menuone,noselect,noinsert
        最近修改于 ~/.config/nvim/config/general.vim

:version

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBU
G -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fst
ack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNI
BI_HAS_VAR_FROM -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/config -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/s
rc -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/sr
c/nvim/auto -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/include
编译者 [email protected]

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

     系统 vimrc 文件: "$VIM/sysinit.vim"
         $VIM 预设值: "/usr/local/Cellar/neovim/0.3.1/share/nvim"

Run :checkhealth for more info

:messages

NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBU
G -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fst
ack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNI
BI_HAS_VAR_FROM -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/config -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/s
rc -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/sr
c/nvim/auto -I/tmp/neovim-20180721-48604-1emkq4l/neovim-0.3.1/build/include
:scriptnames
  1: ~/.config/nvim/init.vim
  2: ~/.config/nvim/config/vimrc
  3: ~/.config/nvim/config/init.vim
  4: ~/.config/nvim/config/neovim.vim
  5: ~/.cache/vim/dein/repos/github.com/Shougo/dein.vim/autoload/dein.vim
  6: ~/.cache/vim/dein/state_nvim.vim
  7: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/ftoff.vim
  8: ~/.config/nvim/config/plugins/all.vim
  9: ~/.config/nvim/filetype.vim
 10: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/filetype.vim
 11: ~/.cache/vim/dein/.cache/init.vim/.dein/ftdetect/ftdetect.vim
 12: ~/.cache/vim/dein/.cache/init.vim/.dein/ftplugin.vim
 13: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/ftplugin.vim
 14: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/indent.vim
 15: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/syntax.vim
 16: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/synload.vim
 17: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/syncolor.vim
 18: ~/.config/nvim/config/general.vim
 19: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/provider/clipboard.vim
 20: ~/.config/nvim/config/filetype.vim
 21: ~/.config/nvim/config/mappings.vim
 22: ~/.config/nvim/config/theme.vim
 23: ~/.config/nvim/colors/NeoSolarized.vim
 24: ~/.config/nvim/themes/rafi-2017.vim
 25: ~/.local/share/nvim/site/autoload/plug.vim
 26: ~/.config/nvim/plugin/hlsearch.vim
 27: ~/.config/nvim/plugin/sessions.vim
 28: ~/.config/nvim/plugin/vault.vim
 29: ~/.config/nvim/plugin/whitespace.vim
 30: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/cursorword.vim
 31: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/gitbranch.vim
 32: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/localrc.vim
 33: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/parenmatch.vim
 34: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/peekaboo.vim
 35: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/peekaboo.vim
36: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/sleuth.vim
 37: ~/.cache/vim/dein/.cache/init.vim/.dein/plugin/tmux_navigator.vim
 38: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/gzip.vim
 39: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/health.vim
 40: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/man.vim
 41: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/matchit.vim
 42: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/matchparen.vim
 43: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/netrwPlugin.vim
 44: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/rplugin.vim
 45: ~/.local/share/nvim/rplugin.vim
 46: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/remote/host.vim
 47: ~/.cache/vim/dein/repos/github.com/Shougo/dein.vim/autoload/dein/autoload.vim
 48: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/remote/define.vim
 49: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/rrhelper.vim
 50: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/shada.vim
 51: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/spellfile.vim
 52: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/tarPlugin.vim
 53: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/tohtml.vim
 54: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/tutor.vim
 55: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/plugin/zipPlugin.vim
 56: ~/.cache/vim/dein/repos/github.com/Shougo/dein.vim/autoload/dein/util.vim
 57: ~/.cache/vim/dein/repos/github.com/ludovicchabant/vim-gutentags/plugin/gutentags.vim
 58: ~/.cache/vim/dein/repos/github.com/MattesGroeger/vim-bookmarks/plugin/bookmark.vim
 59: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/plugin/gitgutter.vim
 60: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/utility.vim
 61: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/highlight.vim
 62: ~/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/plugin/jedi.vim
 63: ~/.cache/vim/dein/repos/github.com/tmhedberg/SimpylFold/plugin/SimpylFold.vim
 64: ~/.config/nvim/ftplugin/python.vim
 65: ~/.cache/vim/dein/repos/github.com/tmhedberg/SimpylFold/ftplugin/python/SimpylFold.vim
 66: ~/.cache/vim/dein/repos/github.com/tmhedberg/SimpylFold/autoload/SimpylFold.vim
 67: ~/.cache/vim/dein/repos/github.com/vim-scripts/python_match.vim/ftplugin/python_match.vim
 68: ~/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/ftplugin/python/jedi.vim
 69: ~/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/autoload/jedi.vim
 70: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/provider/python3.vim
 71: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/provider/pythonx.vim
 72: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/provider.vim
 73: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/ftplugin/python.vim
 74: ~/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/after/ftplugin/python/jedi.vim
 75: ~/.cache/vim/dein/repos/github.com/Vimjas/vim-python-pep8-indent/indent/python.vim
 76: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/indent/python.vim
 77: ~/.cache/vim/dein/repos/github.com/vim-python/python-syntax/syntax/python.vim
 78: /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/python.vim
 79: ~/.cache/vim/dein/repos/github.com/davidhalter/jedi-vim/after/syntax/python.vim
 80: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/localrc.vim
 81: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/parenmatch.vim
 82: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/gitbranch.vim
 83: ~/.cache/vim/dein/repos/github.com/ludovicchabant/vim-gutentags/autoload/gutentags.vim
 84: ~/.cache/vim/dein/repos/github.com/nathanaelkane/vim-indent-guides/plugin/indent_guides.vim
 85: ~/.cache/vim/dein/repos/github.com/nathanaelkane/vim-indent-guides/autoload/indent_guides.vim
 86: ~/.cache/vim/dein/repos/github.com/nathanaelkane/vim-indent-guides/autoload/color_helper.vim
 87: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/cursorword.vim
 88: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter.vim
 89: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/async.vim
 90: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/debug.vim
 91: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/diff.vim
 92: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/hunk.vim
 93: ~/.cache/vim/dein/repos/github.com/airblade/vim-gitgutter/autoload/gitgutter/sign.vim
 94: ~/.cache/vim/dein/repos/github.com/MattesGroeger/vim-bookmarks/autoload/bm.vim
 95: ~/.cache/vim/dein/.cache/init.vim/.dein/autoload/badge.vim

@blueyed
Copy link
Collaborator

blueyed commented Jul 28, 2018

There is no new information in your comments info, is there?

I've just noticed that asyncio is in /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/__init__.py, whereas jedi-vim uses /usr/local/Cellar/python/3.6.5_1/.

So there is an issue with your setup.

Since #858 was just merged, please update and check :JediDebugInfo for the list of known environments to jedi-vim - that might help us with improving the next step where you would be able to select different environments.

Otherwise (typed this already):
Please try a clean virtualenv:

python3 -m venv .venv
source .venv/bin/activate
pip install asyncio
nvim

For me asyncio gets completed, e.g. after:

import asyncio

asyncio.

Also try a minimal vimrc, e.g. the following in jedi-vim's checkout directory:

let script_dir = fnamemodify(expand('<sfile>'), ':h')
let &runtimepath = script_dir.','.&rtp.','.script_dir.'/after'
syntax on
filetype plugin indent on

And then use it via nvim -u minimal.vimrc t.py.

@blueyed
Copy link
Collaborator

blueyed commented Jul 28, 2018

I think this can be closed already, but please provide the requested feedback from above.

@blueyed blueyed closed this as completed Jul 28, 2018
@yangsoon
Copy link
Author

thanks vary much

@blueyed
Copy link
Collaborator

blueyed commented Jul 28, 2018

@yangsoon
You're welcome, but please consider providing feedback to my questions.. :)

@yangsoon
Copy link
Author

can we set the jedi-vim Known environments?

@blueyed
Copy link
Collaborator

blueyed commented Jul 28, 2018

Not yet.
WIP in #836.

@blueyed
Copy link
Collaborator

blueyed commented Jul 28, 2018

You can however trick it by using VIRTUAL_ENV I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants