Python is not included in Vim

I am trying to run the Xdebug vim plugin which is python dependent. Here is my environment: Windows 7 Professional 64bit, Vim 7.3. I have everything configured for this plugin, but when I press F5 nothing happens. I found several blogs describing some additional steps to get this working on Windows. They all stressed that the correct version of Python is installed correctly. I looked at the plugin code in the debugger.vim file and close to the top, which checks if python is available and exits if it is not. I inserted an echo command to tell me if python is not installed, and of course a window pops up telling you that. Here is the modified code:

if !has("python") echo 'python NOT loaded' finish endif 

According to this blog http://phphints.wordpress.com/2008/08/20/add-debug-support-to-vim/ I need to install a version of python that includes a vim dll that searches when I run version command from vim. Mine Report:

 -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DDYNAMIC_PYTHON3_DLL=\"python31.dll\" 

So, I installed the 64-bit version of python 2.7.1. The same result, although python27.dll is located in the System 32 folder. I also tried to add the location of python.exe to PATH, but that did not help. I also tried installing the 64-bit version of python 3.1.3, but that didn't help. Any ideas?

+4
source share
2 answers

I made the following changes and python is working now (conditional echo condition is never reached). I uninstalled Vim and installed it again. I removed the 64-bit versions of Python 2.7.1 and 3.1.3. I installed the 32-bit version of python 2.7.1.

I assume that the change has changed the use of the 32-bit version of Python 2.7.1, since I am using the 32-bit version of Vim. What do you think (leave a comment)?

+6
source

This may not be a direct solution to your problem, but you need to make sure that the vim executable is compiled with Python support.

You can check which options are compiled by running : version on the vim command line.

Also, as far as I know, python3 support is only added after vim7.3. If you have vim7.2, it is best to use python 2.

+1
source

Source: https://habr.com/ru/post/1346841/


All Articles