I cannot use python in GVIM. When I type:
:python print 1
it just closes GVIM without any message. I triend to run it with -V90logfile
but I couldn
Finally solved the problem.
It turned out that Python uses PYTHONPATH
variable to resolve the PYTHON folder (used to load python libraries and so on). Here is the default value for Python 2.7:
C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk
The variable can be set using one of the following:
Set the default value of HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\PythonPath
key
Create environment variable PYTHONPATH
and set the value (same as you edit global PATH
)
This is the most portable way. Edit your _vimrc (i.e. open vim and enter :e $MYVIMRC
command) and set the variable:
let $PYTHONPATH = "C:\\Python27\\Lib;C:\\Python27\\DLLs;C:\\Python27\\Lib\\lib-tk"