jedi-vim fails to initialize "No module named _socket"
See original GitHub issueIssue
Steps to reproduce
(Used provided minimal.vimrc)
- Open Vim
- Open a python file
- Get the message (see in full in Jedi-vim debug information
"ERROR: could not import the "jedi" Python module: ModuleNotFoundError: No module named '_socket'
Traceback (most recent call last):
File "C:\Users\Ted\.vim\bundle\jedi-vim\pythonx\jedi_vim.py", line 112, in <module>
import jedi
etc....
- Can’t use jedi-vim!
Additional Debug Info
- I get Windows builds from tuxproject’s vim builds page.
- Running
where python
in cmd,:!where python
in the commandline in vim, andwhere
in the term all say python.exe inC:\Users\Ted\Miniconda3\python.exe
, same as what is in my PATH. - To make python work in vim, I had to put python36.dll and python36.zip in
C:\Vim
. I’ve tried many times with this and other Windows builds to make it run from my PATH, but I always end up copying those files to the Vim install directory.
Output of “:verbose JediDebugInfo”
Jedi-vim debug information
Using Python version: 3
- global sys.version:
3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]
- global site module:
C:\Vim\python36.zip\site.pyc
ERROR: could not import the “jedi” Python module: ModuleNotFoundError: No module named 'socket’ Traceback (most recent call last): File “C:\Users\Ted.vim\bundle\jedi-vim\pythonx\jedi_vim.py”, line 112, in <module> import jedi File "C:\Users\Ted.vim\bundle\jedi-vim\pythonx\jedi\jedi_init.py", line 41, in <module> from jedi.api import Script, Interpreter, set_debug_function,
File “C:\Users\Ted.vim\bundle\jedi-vim\pythonx\jedi\jedi\api_init_.py”, line 27, in <module> from jedi.api.environment import InterpreterEnvironment File “C:\Users\Ted.vim\bundle\jedi-vim\pythonx\jedi\jedi\api\environment.py”, line 18, in <module> from jedi.evaluate.compiled.subprocess import get_subprocess,
File “C:\Users\Ted.vim\bundle\jedi-vim\pythonx\jedi\jedi\evaluate\compiled\subprocess_init_.py”, line 13, in <module> import socket File “socket.py”, line 49, in <module> - jedi-vim git version: 0.9.0-27-g67fd8c6
- jedi git submodule status: bd7c65d9639c2d451d44c6d135b4f6043a918950 pythonx/jedi (v0.12.0)
- parso git submodule status: 6f385bdba182059e0c46917a414981a6d0894527 pythonx/parso (v0.2.1)
Settings
omnifunc=python3complete#Complete
Last set from C:\Vim\ftplugin\python.vim
completeopt=menuone,longest,preview
Last set from ~\.vim\bundle\jedi-vim\plugin\jedi.vim
:version
VIM - Vi IMproved 8.1 (2018 May 17, compiled May 20 2018 15:37:12)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-9
Compiled by hp@HP-PC
Huge version with GUI. Features included (+) or not (-):
+acl +emacs_tags +mouse +tag_binary
+arabic +eval +mouseshape +tag_old_static
+autocmd +ex_extra +multi_byte_ime/dyn -tag_any_white
+autoservername +extra_search +multi_lang +tcl/dyn
+balloon_eval +farsi +mzscheme/dyn -termguicolors
-balloon_eval_term +file_in_path +netbeans_intg +terminal
+browse +find_in_path +num64 -tgetent
++builtin_terms +float +ole -termresponse
+byte_offset +folding +packages +textobjects
+channel -footer +path_extra +timers
+cindent +gettext/dyn +perl/dyn +title
+clientserver -hangul_input +persistent_undo +toolbar
+clipboard +iconv/dyn -postscript +user_commands
+cmdline_compl +insert_expand +printer +vertsplit
+cmdline_hist +job +profile +virtualedit
+cmdline_info +jumplist +python/dyn +visual
+comments +keymap +python3/dyn +visualextra
+conceal +lambda +quickfix +viminfo
+cryptv +langmap +reltime +vreplace
+cscope +libcall +rightleft -vtp
+cursorbind +linebreak +ruby/dyn +wildignore
+cursorshape +lispindent +scrollbind +wildmenu
+dialog_con_gui +listcmds +signs +windows
+diff +localmap +smartindent +writebackup
+digraphs +lua/dyn +startuptime -xfontset
+directx +menu +statusline -xim
-dnd +mksession -sun_workshop +xpm_w32
-ebcdic +modify_fname +syntax -xterm_save
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_XPM_W32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /MD -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DGLOBAL_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_MZSCHEME -I "C:\Users\hp\Desktop\racket-x64\include" -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracketxxxxxxx.dll\" -DDYNAMIC_MZGC_DLL=\"libmzgcxxxxxxx.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl526.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=24 -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:AMD64 msvcrt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib /STACK:8388608 /nodefaultlib:python27.lib /nodefaultlib:python36.lib "C:\TCL\lib\tclstub86.lib" WSock32.lib .\xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
:messages
--No lines in buffer--
--No lines in buffer--
30 more lines
29 lines yanked
1 more line; before #10 44 seconds ago
1 more line; before #9 46 seconds ago
31 fewer lines; before #8 47 seconds ago
1 more line; before #7 96 seconds ago
1 more line; before #6 97 seconds ago
1 more line; before #5 97 seconds ago
1 more line; before #4 97 seconds ago
4 fewer lines; before #3 09:38:12
1 more line; before #2 09:38:01
1 line less; before #1 09:37:55
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
C:\Users\Ted\.vim\bundle\jedi-vim
"..\..\..\XPlane2Blender\io_xplane2blender\xplane_props.py" [unix] 1891L, 68317C
VIM - Vi IMproved 8.1 (2018 May 17, compiled May 20 2018 15:37:12)
1: ~\.vim\bundle\jedi-vim\minimal.vimrc
2: C:\Vim\syntax\syntax.vim
3: C:\Vim\syntax\synload.vim
4: C:\Vim\syntax\syncolor.vim
5: C:\Vim\filetype.vim
6: C:\Vim\menu.vim
7: C:\Vim\autoload\paste.vim
8: C:\Vim\ftplugin.vim
9: C:\Vim\indent.vim
10: C:\Vim\plugin\getscriptPlugin.vim
11: C:\Vim\plugin\gzip.vim
12: C:\Vim\plugin\logiPat.vim
13: C:\Vim\plugin\manpager.vim
14: C:\Vim\plugin\matchparen.vim
15: C:\Vim\plugin\netrwPlugin.vim
16: C:\Vim\plugin\rrhelper.vim
17: C:\Vim\plugin\spellfile.vim
18: C:\Vim\plugin\tarPlugin.vim
19: C:\Vim\plugin\tohtml.vim
20: C:\Vim\plugin\vimballPlugin.vim
21: C:\Vim\plugin\zipPlugin.vim
22: ~\.vim\bundle\jedi-vim\plugin\jedi.vim
23: ~\.vim\bundle\jedi-vim\autoload\jedi.vim
24: C:\Vim\syntax\python.vim
25: ~\.vim\bundle\jedi-vim\after\syntax\python.vim
26: C:\Vim\ftplugin\python.vim
27: ~\.vim\bundle\jedi-vim\ftplugin\python\jedi.vim
28: ~\.vim\bundle\jedi-vim\after\ftplugin\python\jedi.vim
29: C:\Vim\indent\python.vim
178 more lines
4 fewer lines
168 lines yanked
1 more line; before #9 36 seconds ago
1 more line; before #8 38 seconds ago
1 more line; before #7 38 seconds ago
1 more line; before #6 43 seconds ago
4 more lines; before #5 43 seconds ago
1 more line; before #4 47 seconds ago
1 more line; before #3 48 seconds ago
1 more line; before #2 48 seconds ago
179 fewer lines; before #1 50 seconds ago
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at oldest change
Already at newest change
:scriptnames
1: ~\.vim\bundle\jedi-vim\minimal.vimrc
2: C:\Vim\syntax\syntax.vim
3: C:\Vim\syntax\synload.vim
4: C:\Vim\syntax\syncolor.vim
5: C:\Vim\filetype.vim
6: C:\Vim\menu.vim
7: C:\Vim\autoload\paste.vim
8: C:\Vim\ftplugin.vim
9: C:\Vim\indent.vim
10: C:\Vim\plugin\getscriptPlugin.vim
11: C:\Vim\plugin\gzip.vim
12: C:\Vim\plugin\logiPat.vim
13: C:\Vim\plugin\manpager.vim
14: C:\Vim\plugin\matchparen.vim
15: C:\Vim\plugin\netrwPlugin.vim
16: C:\Vim\plugin\rrhelper.vim
17: C:\Vim\plugin\spellfile.vim
18: C:\Vim\plugin\tarPlugin.vim
19: C:\Vim\plugin\tohtml.vim
20: C:\Vim\plugin\vimballPlugin.vim
21: C:\Vim\plugin\zipPlugin.vim
22: ~\.vim\bundle\jedi-vim\plugin\jedi.vim
23: ~\.vim\bundle\jedi-vim\autoload\jedi.vim
24: C:\Vim\syntax\python.vim
25: ~\.vim\bundle\jedi-vim\after\syntax\python.vim
26: C:\Vim\ftplugin\python.vim
27: ~\.vim\bundle\jedi-vim\ftplugin\python\jedi.vim
28: ~\.vim\bundle\jedi-vim\after\ftplugin\python\jedi.vim
29: C:\Vim\indent\python.vim
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
jedi-vim cannot initialize python - Stack Overflow
I installed jedi-vim with Pathogen. I want it to use my anaconda python which is python 3.6 and not my system python.
Read more >jedi-language-server - PyPI
A Language Server for the latest version(s) of Jedi. If using Neovim/Vim, we recommend using with coc-jedi. Supports Python versions 3.7 and newer....
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to users, introduce a simple stability voting system and have a core team...
Read more >[Fixed] ModuleNotFoundError: No module named 'websocket ...
The most frequent source of this error is that you haven't installed websocket-client explicitly with pip install websocket-client . Alternatively, you may have ......
Read more >emacs-jedi - Bountysource
Error (jedi): Failed to start Jedi EPC server, M-x jedi:install-server don't ... import main ModuleNotFoundError: No module named 'jediepcserver' *** EPC ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We haven’t seen these issues before, because we haven’t imported
subprocess
. Now that we do we obviously import more libraries and that causes problems on some broken installations.Likely more due to using
subprocess
and other modules that are more likely to be broken probably.