Pattern not found for numpy or pandas
Issue
Hi Sir, I am new to vim and trying to use your package. But it cannot auto complete numpy functions. I installed jedi-vim by Pathogeon.
Steps to reproduce
For example, when I try
import numpy as np
np.
It just shows "Pattern not found" and no pop-up appears.
Output of “:verbose JediDebugInfo”
:verbose JediDebugInfo
Jedi-vim debug information
Using Python version: 3
- sys.version:
3.5.2 (default, Nov 23 2017, 16:37:01), [GCC 5.4.0 20160609] - site module:
/usr/lib/python3.5/site.pyJedi path:/root/.vim/bundle/jedivim/pythonx/jedi/jedi/__init__.py - version: 0.11.1
- sys_path:
/usr/lib/python35.zip/usr/lib/python3.5/usr/lib/python3.5/plat-x86_64-linux-gnu/usr/lib/python3.5/lib-dynload/usr/local/lib/python3.5/dist-packages/usr/lib/python3/dist-packages_vim_path_
- jedi-vim git version: 0.9.0
- jedi git submodule status: 02f238ce08f2d7f9c4af9a17cbf5754836775e2f pythonx/jedi (v0.11.1) 2ca629a2f6db2e905ddd5188113b1045f8a00fc2 pythonx/parso (v0.1.1)
Settings
omnifunc=jedi#completions
Last set from ~/.vim/bundle/jedivim/autoload/jedi.vim
completeopt=menuone,longest,preview
Last set from ~/.vim/bundle/jedivim/autoload/jedi.vim
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl +dialog_con +job -mouse_sysmouse +scrollbind +visual
+arabic +diff +jumplist +mouse_urxvt +signs +visualextra
+autocmd +digraphs +keymap +mouse_xterm +smartindent +viminfo
-balloon_eval -dnd +langmap +multi_byte +startuptime +vreplace
-browse -ebcdic +libcall +multi_lang +statusline +wildignore
++builtin_terms +emacs_tags +linebreak -mzscheme -sun_workshop +wildmenu
+byte_offset +eval +lispindent +netbeans_intg +syntax +windows
+channel +ex_extra +listcmds +packages +tag_binary +writebackup
+cindent +extra_search +localmap +path_extra +tag_old_static -X11
-clientserver +farsi -lua -perl -tag_any_white -xfontset
-clipboard +file_in_path +menu +persistent_undo -tcl -xim
+cmdline_compl +find_in_path +mksession +postscript +terminfo -xsmp
+cmdline_hist +float +modify_fname +printer +termresponse -xterm_clipboard
+cmdline_info +folding +mouse +profile +textobjects -xterm_save
+comments -footer -mouseshape -python +timers -xpm
+conceal +fork() +mouse_dec +python3 +title
+cryptv +gettext +mouse_gpm +quickfix -toolbar
+cscope -hangul_input -mouse_jsbterm +reltime +user_commands
+cursorbind +iconv +mouse_netterm +rightleft +vertsplit
+cursorshape +insert_expand +mouse_sgr -ruby +virtualedit
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fPIE -fstack-protector-strong
-Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim
-lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.5/config-3.5m-x86_64
-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm
:messages
Messages maintainer: Bram Moolenaar <[email protected]>
"newt.py" 3L, 21C
E475: Invalid argument: @+>
E492: Not an editor command: verbose JediDebugInfoo
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
:scriptnames
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim74/debian.vim
3: /usr/share/vim/vim74/syntax/syntax.vim
4: /usr/share/vim/vim74/syntax/synload.vim
5: /usr/share/vim/vim74/syntax/syncolor.vim
6: /usr/share/vim/vim74/filetype.vim
7: ~/.vimrc
8: ~/.vim/autoload/pathogen.vim
9: /usr/share/vim/vim74/ftoff.vim
10: /usr/share/vim/vim74/syntax/nosyntax.vim
11: /usr/share/vim/vim74/ftplugin.vim
12: /usr/share/vim/vim74/indent.vim
13: ~/.vim/bundle/jedivim/plugin/jedi.vim
14: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
15: /usr/share/vim/vim74/plugin/gzip.vim
16: /usr/share/vim/vim74/plugin/logiPat.vim
17: /usr/share/vim/vim74/plugin/matchparen.vim
18: /usr/share/vim/vim74/plugin/netrwPlugin.vim
19: /usr/share/vim/vim74/plugin/rrhelper.vim
20: /usr/share/vim/vim74/plugin/spellfile.vim
21: /usr/share/vim/vim74/plugin/tarPlugin.vim
22: /usr/share/vim/vim74/plugin/tohtml.vim
23: /usr/share/vim/vim74/plugin/vimballPlugin.vim
24: /usr/share/vim/vim74/plugin/zipPlugin.vim
25: /usr/share/vim/vim74/syntax/python.vim
26: ~/.vim/bundle/jedivim/after/syntax/python.vim
27: ~/.vim/bundle/jedivim/autoload/jedi.vim
28: ~/.vim/bundle/jedivim/ftplugin/python/jedi.vim
29: /usr/share/vim/vim74/ftplugin/python.vim
30: ~/.vim/bundle/jedivim/after/ftplugin/python/jedi.vim
31: /usr/share/vim/vim74/indent/python.vim
Please try again with latest master and post the new :verbose JediDebugInfo.
I'm pretty sure that you're probably not having the right Python version activated.
I've found that I can get jedi-vim to work with my python 2.7 conda environment.
Here's what I had to do:
(1) make sure i had an up-to-date vim that was compiled with python 2.7. I used brew with the following arguments:
brew install vim --with-python@2
(2) Make sure "vi" -> "vim". (I use "vi" in the command line. If you use "vim", you should be good. I did this by adding this line to my .bash_profile.
alias vi=vim
for the longest time, vi kept crashing on me until i checked :version in vi and realized it wasn't the same version that had been brew installed.
(3) The final piece is to add the following line to my .vimrc file
let g:jedi#force_py_version=2.7
This line forces jedi to use python version 2.7. Without this line, jedi tries to use version 3.x
I hope this helps someone. I spent all day troubleshooting but fortunately, I learned a lot in the process.
@djchou Thanks for your comment.
No answer of @ktlichkid here. I'm closing.