Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need Windows 7 + vim + python for writing vim plugins.

:python print("hello")
E370: Could not load library python27.dll
E263: Sorry, this command is disabled, the Python library could not be loaded.

Tried everything:

  • reinstalled vim
  • uninstalled all my 64bit python versions and installed 32bit ones
  • reinstalled vim again
  • restarted computer
  • punched desk and keyboard
  • restarted computer
share|improve this question

migrated from Aug 12 '11 at 1:40

This question came from our site for professional and enthusiast programmers.

For all those having the same problem: installing "cream" fixes it: Yes - this question will probably get closed - but the fact is that there is still no solution to this anywhere on the web. – drozzy Aug 11 '11 at 21:00
Answering your own question is good, but post it as an answer, not a comment, then accept it after two days. – agf Aug 11 '11 at 21:03
compile it with python support – Eric Fortis Aug 11 '11 at 21:52
Hm... I am not compiling it, but rather downloading an installer. – drozzy Aug 11 '11 at 22:52
@drozzy: there are installers here: Had the same problem as you and didn't want to build Vim on my own. Simple! – eckes Sep 26 '13 at 13:34


:version will show you if you have 32bit vim or 64bit
python.exe will show you if you have 32bit or 64bit python.


Now it's up to you to choose either:

  • 32bit vim + 32bit python or

  • 64bit vim + 64bit python

otherwise it won't work complaining with the error you quoted.

NB Latest 64bit vim cannot be downloaded from the download page anymore. For some mysterious reason now there's a new special page for that:

share|improve this answer

Are you sure that you installed the same version of 32 bit python that Vim was looking for? I see no reason that this wouldn't have fixed your problem, unless you somehow had a gvim exe built without python support. Anyway, I had precisely this problem, and the obvious thing to me was that my python dll was x64, whilst I had 32 bit vim. The solution for me was simply to build a 64 bit version of Vim. I much prefer upgrading Vim to downgrading Python. The arguments I sent to the make file were:

nmake -f Make_mvc.mak GUI=yes CPU=AMD64 PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27

I then replaced my original 32 bit gvim.exe with the 64 bit one I just built. Everything worked perfectly. If you are worried about the hassle of the build, don't be- it was very straightforward using visual studio 2010's compilers, and running make from the appropriate visual studio command prompt (x64 cross tools). I can send further instructions if needed.

share|improve this answer
i was exactly in your situation. since i didn't want to recompile vim, i installed the 32bit version of python 2.7 and now gvim works like a charm! – apelliciari Apr 2 '12 at 23:05
There's a precompiled x64 version (linked from download page), installing it resolves the problem. – Antony Hatchkins Nov 15 '13 at 18:27
up vote 2 down vote accepted

Ok here it goes: For some reason installing "cream" fixes it:

:python print("hello")

Interestingly enough, "cream" includes a regular version of "gvim" - so I can use just that.

share|improve this answer

I had this problem with VIM 7.2 looking for the python25.dll This was fixed by adding the path to the python25.dll file (c:\python25\ on my system) to the PATH environment variable.

share|improve this answer

If you want to keep your 64-bit version of Python, at this moment, an easy to install and recent version of Vim64 for Windows can be found here. It even uninstalls your existing 32-bit gvim for you.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .