python 2.7.11 및 python 3.5.1 (32 비트 모두)이 설치된 Windows 7 64 비트가 있고 python / dyn 및 python3 / dyn으로 vim을 컴파일했지만 다음과 같은 오류가 계속 발생합니다.
:py print "hello"
E887: Sorry, this command is disabled, the Python's site module could not be loaded
그러나 다음은 모두 잘 작동합니다.
C:\python27\python -c "import site;"
과
:py3 print("hello")
이것은 내 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
그리고 where python27.dll
출력C:\Windows\System32
이 Google 그룹 게시물 에서 조언을 시도 했지만 아무 소용이 없습니다.
YouCompleteMe를 성공적으로 실행하고 싶습니다.
:!where python27.dll
을 반환합니다 C:\Windows\System32\python27.dll
. 또한 라이브러리가없는 경우, 다른 오류가 발생 참고 : E370: Could not load library python27.dll
와E263: Sorry, this command is disabled, the Python library could not be loaded.
:py3
작동하지만 :py
그렇지 않습니까? :py3
vim 실행 중에 플러그인 중 하나가 실행되면 가능합니다 . :he python-2-and-3
python / dyn과 python3 / dyn이 함께 작동하는 방법을 설명 하십시오 .
:help python-dynamic
말한다...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.