I have Python 2.7.10 x64 installed along with Vim 7.4 x64 compiled with both +python/dyn and +python3/dyn support.
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 11 2015 11:37:42)
MS-Windows 64-bit console version
Included patches: 1-965
Compiled by veegee@veegee-win8
Huge version without GUI. Features included (+) or not (-):
+acl +eval +mouse +syntax
+arabic +ex_extra -mouseshape +tag_binary
+autocmd +extra_search +multi_byte +tag_old_static
-balloon_eval +farsi +multi_lang -tag_any_white
-browse +file_in_path -mzscheme -tcl
++builtin_terms +find_in_path -netbeans_intg -tgetent
+byte_offset +float +path_extra -termresponse
+cindent +folding -perl +textobjects
+clientserver -footer +persistent_undo +title
+clipboard +gettext/dyn -postscript -toolbar
+cmdline_compl -hangul_input +printer +user_commands
+cmdline_hist +iconv/dyn +profile +vertsplit
+cmdline_info +insert_expand +python/dyn +virtualedit
+comments +jumplist +python3/dyn +visual
+conceal +keymap +quickfix +visualextra
+cryptv +langmap +reltime +viminfo
+cscope +libcall +rightleft +vreplace
+cursorbind +linebreak -ruby +wildignore
+cursorshape +lispindent +scrollbind +wildmenu
+dialog_con +listcmds +signs +windows
+diff +localmap +smartindent +writebackup
+digraphs +lua/dyn -sniff -xfontset
-dnd +menu +startuptime -xim
-ebcdic +mksession +statusline -xterm_save
+emacs_tags +modify_fname -sun_workshop -xpm_w32
While running Vim :echo has('python') returns 1.
I was able to get it working long enough to install a single plugin with Plug which requires Python support. After changing nothing, it's now no longer working.
Additionally, I can clean plugins just fine:
1 Searching for unused plugins in C:\Users\zqueal\.vim\plugged
2 [=====]
3
4 Already clean.
This would leave me to believe that it's at least working intermittently. However, when running :python import sys; print(sys.version) I get:
E887: Sorry, this command is disabled, the Python's site module could not be loaded.
Anyone able to help me out, here?
—
Reply to this email directly or view it on GitHub.![]()
Do you have multiple python27.dll in your system? Such as py2exe application. If so, try setting 'pythondll' option to system wide python27.dll path.
Ahh sorry, 'pythondll' is unix only option.
The pyv error is from https://github.com/junegunn/vim-plug/blob/master/plug.vim#L831
Is the folder where python27.dll resides exist in the PATH environment?
You can also try to set the PYTHON_HOME environment variable to the python installation folder. Sometimes it is not found correctly. To change windows environment variables I suggest something like RapidEE [1]
I confirmed that vim + python-2.7.11 doesn't work. And vim + python-2.7.10 does work.
Python-2.7.11 distribution seems broken. See http://bugs.python.org/issue25824.
Closed #526.
I confirmed that vim + python-2.7.11 doesn't work. And vim + python-2.7.10 does work.
This was it! Thanks for the help, gentlemen.
Well, not sure why you're able to work with Python 2.7.11, but Python was correctly installed and in my path but Vim just couldn't recognize it. I have no problem working with 2.7.10 if it fixes the issue I was having.
@char101 Are you using the official python 2.7.11 installer? I don't get the same info as you:
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
I confirmed that vim + python-2.7.11 doesn't work. And vim + python-2.7.10 does work.
Python-2.7.11 distribution seems broken. See http://bugs.python.org/issue25824.
@ynkdir I don't think this is exactly the same issue. It only concerns the 32-bit installer, not the 64-bit one.
Are you using the official python 2.7.11 installer?
Of course.
It only concerns the 32-bit installer, not the 64-bit one.
I installed the x64 installer.... So.
Of course.
I was asking to @char101. His python version:
2.7.11 (default, Dec 9 2015, 16:33:12) [MSC v.1900 64 bit (AMD64)]
is different than the one I get from the official python installer:
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
It is compiled with a different version of MSVC so I suspect that he is using a custom build.
I installed the x64 installer.... So.
I was talking about the python bug report.
I compiled python myself. My point is that you can make it work by setting PYTHONHOME/PYTHON_HOME environment variable because the registry is not the only place Python use to find its home path. If you use the installer then python will probably use the registry to find its home path, then you can probably just rename the registry key as written in the python bug report to make it work.
HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
->
HKLM\Software\Wow6432Node\Python\PythonCore\2.7-32\PythonPath
By the way I embed python directly into the vim directory, and compress and the python standard libraries into one zip file.
Thanks for the answer. Yes, setting the PYTHONHOME variable to the Python path or changing the folder in the registry from:
HKLM\Software\Python\PythonCore\2.7
to
HKLM\Software\Python\PythonCore\2.7-32
will work (note that the path is not the same for python 64-bit). Not obvious because the python report was about the 32-bit installer. I added a comment to clarify this.
PYTHONHOME environment variable doesn't work if your Vim was compiled with PYTHON_HOME define. See #500.
After restarting having Python 2.7.10 no longer worked. I uninstalled all versions of Python starting from scratch again. Then setting PYTHONHOME to C:\Python27 seems to have worked;
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 5 2015 19:54:14)
MS-Windows 32-bit console version
Included patches: 1-954
Compiled by hp@HP-PC
Huge version without GUI.
All of my Python plugins are working again and :echo has('python') is back to 1. I really appreciate the help, guys!
Python 2.7.12 has been released.
I confirmed that the problem was fixed with Python 2.7.12.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
But in python 3.7 32 bit how can i configure vim in Windows 10
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.![]()
(Note that this issue is about python 2.7, not about 3.7.)
If you use the latest version from vim-win32-installer, you should use Python 3.9 from the official site. (Python 3.7 doesn't probably work.) When you use a 64-bit version of Vim, you should use a 64-bit version of Python, and when you use a 32-bit version of Vim, you should use a 32-bit version of Python.
If you want to build Vim by yourself, you should specify PYTHON3, PYTHON3_VER, and DYNAMIC_PYTHON3 correctly. See src/INSTALLpc.txt for detail.