Gvim cannot load my Python

I want to use gvim (on Windows 7) as my Python IDE, but gvim cannot load my python. My os is Windows 7 X64 Service Pack 1 (SP1), I am using Python35 (64)

I run: version in gvim, the output includes:

....

+python/dyn

+python3/dyn

      

...

Compilation:...

-DFEAT_PYTHON -DDYNMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python35.dll\"

      

....

This means that this gvim is compiled with python and python3 support, but when I run

:echo has("python")

      

or

:echo has("python3")

      

both return 0

result: python print (3):

E370: Failed to load library python27.dll

E263: Sorry, this command is disabled, the Python library cannot be loaded.

My python35 directory is C: \ Python35 and it's in my PATH.

Why is this? Gvim is only looking for python27 and not python35?

I am following this vim-ipython-failed-on-windows-7 and trying to modify my registry but it doesn't work.

Do I need to recompile gvim myself, or should I abandon gvim?

+3


source to share


2 answers


I had this problem too. I reinstalled python several times, made sure both python and Vim are on the same architecture (both 32-bit) with no success. The only thing that resolved it was to copy python27.dll to the Vim directory. A bit rough, but it works!



+2


source


The command :python

will use the Python 2 interpreter [.7]. Since you just installed Python 3 [.5], you need to use the :python3

/ command :py3

.



+2


source







All Articles