Ho Windows 7 a 64 bit, con python 2.7.11 e python 3.5.1 (entrambi a 32 bit) installati e ho compilato vim con python / dyn e python3 / dyn, ma continuo a ricevere il seguente errore:
:py print "hello"
E887: Sorry, this command is disabled, the Python's site module could not be loaded
Tuttavia, tutto quanto segue funziona bene:
C:\python27\python -c "import site;"
e
:py3 print("hello")
Queste sono le informazioni sulla mia versione di vim:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 29 2016 11:58:41)
MS-Windows 32-bit console version
Included patches: 1-1194
Compiled by afontaine@PHOENIX
Huge version without GUI. Features included (+) or not (-):
+acl +eval -mouseshape +tag_old_static
+arabic +ex_extra +multi_byte_ime/dyn -tag_any_white
+autocmd +extra_search +multi_lang -tcl
-balloon_eval +farsi -mzscheme -tgetent
-browse +file_in_path -netbeans_intg -termresponse
++builtin_terms +find_in_path +path_extra +textobjects
+byte_offset +float -perl +title
-channel +folding +persistent_undo -toolbar
+cindent -footer -postscript +user_commands
+clientserver +gettext/dyn +printer +vertsplit
+clipboard -hangul_input +profile +virtualedit
+cmdline_compl +iconv/dyn +python/dyn +visual
+cmdline_hist +insert_expand +python3/dyn +visualextra
+cmdline_info +jumplist +quickfix +viminfo
+comments +keymap +reltime +vreplace
+conceal +langmap +rightleft +wildignore
+cryptv +libcall -ruby +wildmenu
+cscope +linebreak +scrollbind +windows
+cursorbind +lispindent +signs +writebackup
+cursorshape +listcmds +smartindent -xfontset
+dialog_con +localmap -sniff -xim
+diff -lua +startuptime -xterm_save
+digraphs +menu +statusline -xpm_w32
-dnd +mksession -sun_workshop
-ebcdic +modify_fname +syntax
+emacs_tags +mouse +tag_binary
Compilation: gcc -Iproto -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_CHANNEL -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL="python35.dll" -DFEAT_XPM_W32 -I xpm/x86/include -I xpm/x86/../include -O3 -fomit-frame-pointer -freg-struct-return -s
Linking: gcc -Iproto -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_CHANNEL -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL="python35.dll" -DFEAT_XPM_W32 -I xpm/x86/include -I xpm/x86/../include -O3 -fomit-frame-pointer -freg-struct-return -s -mwindows -o gvim.exe -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -Lxpm/x86/lib -lXpm -lole32 -luuid
E where python27.dll
usciteC:\Windows\System32
Ho provato i consigli di questo post di gruppo di Google , ma senza risultati.
Voglio solo far funzionare YouCompleteMe con successo.
:!where python27.dll
ritorna C:\Windows\System32\python27.dll
. Inoltre, se manca la libreria, si verifica un errore diverso: E370: Could not load library python27.dll
eE263: Sorry, this command is disabled, the Python library could not be loaded.
:py3
funziona ma :py
non lo farà? È possibile se uno dei plugin viene eseguito :py3
durante l'avvio di vim. Vedi :he python-2-and-3
per spiegare come python / dyn e python3 / dyn lavorano insieme ..
:help python-dynamic
dice...To use the Python interface the Python DLL must be in your search path. In a console window type "path" to see what directories are used.