Import vim in python gives back errors

python, vim

Solution

It doesn't seem like you need to import it, just make sure your vim is compiled with python support. Check this using vim --version | grep +python. Further, it seems that the vim module is imported automatically when in vim, rendering your import line unnecessary.

Problem

I read some articles about Vimscripting with python. I felt very interested. So I tried to figure out how to do vimscripting with python. But when I tried to import vim, it showed that the module vim wasn't installed. So I searched on the web, but still haven't find the module to install. I also tried pip to search automatically, still failed. Does anyone know where to find the module vim? I am using fedora 17, and I have installed vim 7.3 and python 2.7. Thanks in advance. Here is the error message: ``` >>> import vim Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named vim ```

Original source