On 10/11/10 12:39, Delian Xu wrote:
Hi,
  I wanted to enable the feature of Python in VIM, so I compiled it with
the option of
'*--enable-pythoninterp=yes*' from the source code, but it didn't work.
Please help to have a look.

  My env is *Debian Squeeze* (the testing version) on x86,  and all
packages in the os have been updated.
_

Bellow were the details:_

1. remove old vi/vim packages from the system:
$ sudo apt-get remove vi  vim

2 download the latest src-vim:
$ hg clone https://vim.googlecode.com/hg/

3 configure & make
$ ./configure *--enable-pythoninterp=yes*--enable-cscope
--enable-multibyte --with-features=huge --enable-fontset

$ make && make install

Everything goes well,*No errors *were thrown out.

4. testing:
$ vim --version |grep python
+path_extra -perl +persistent_undo +postscript +printer +profile*-python
-python3* +quickfix +reltime +rightleft -ruby +scrollbind +signs
+smartindent
*
The feature of 'python' was still disabled!*

5.
I wrote my vimrc files in Python, and some error messages were thrown out:
$ vim
E319: Sorry, the command is not available in this version: python << EOF

-the
end------------------------------------------------------------------------------------------------------------------------------

So, how can I compile a VIM package with the feature of Python, anything
I did above was wrong?

You're probably missing a "development" package, see http://users.skynet.be/antoine.mechelynck/vim/compunix.htm

Check if there is a python-dev package available, and if there is, install it; then make sure your config arguments are set (I set them in the environment, see my HowTo page mentioned above) and run "make reconfig" so configure will see that the Python headers are now there and (hopefully) will accept your --enable-pythoninterp argument.

The +python feature needs *.[ch] files which come from Python, only not from the "minimal" Python libraries sufficient to run applications _written_ in Python. Vim's Python interface is a module written in C which interfaces with Python: that's a different kind of beast.


Much thanks,
Delian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Best regards,
Tony.
--
"You are old, father William," the young man said,
        "And your hair has become very white;
And yet you incessantly stand on your head --
        Do you think, at your age, it is right?"

"In my youth," father William replied to his son,
        "I feared it might injure the brain;
But, now that I'm perfectly sure I have none,
        Why, I do it again and again."
                -- Lewis Carrol

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to