J'ai Windows 7 64 bits, avec python 2.7.11 et python 3.5.1 (les deux 32 bits) installés, et j'ai compilé vim avec python / dyn et python3 / dyn, mais je reçois toujours l'erreur suivante:
:py print "hello"
E887: Sorry, this command is disabled, the Python's site module could not be loaded
Cependant, les éléments suivants fonctionnent très bien:
C:\python27\python -c "import site;"
et
:py3 print("hello")
Voici mes informations de version 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
Et where python27.dll
sortiesC:\Windows\System32
J'ai essayé les conseils de ce message de groupe Google , mais en vain.
Je veux juste que YouCompleteMe fonctionne correctement.
:!where python27.dll
retourne C:\Windows\System32\python27.dll
. Notez également que si la bibliothèque est manquante, une erreur différente se produit: E370: Could not load library python27.dll
etE263: Sorry, this command is disabled, the Python library could not be loaded.
:py3
fonctionne mais :py
pas? Il est possible que l'un des plugins s'exécute :py3
lors du lancement de vim. Voir :he python-2-and-3
pour expliquer comment python / dyn et python3 / dyn fonctionnent ensemble ..
:help python-dynamic
dit...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.