我的Debian中有Python 2.7和Python 3.3。 我使用arg --enable-shared
重build了这两个文件。
比使用argsbuild立VIM 7.4之后“ --enable-pythoninterp --enable-python3interp --with-features=huge --with-python-config-dir=PathToConfig --with-python3-config-dir=PathToConfig
”
当我给评论VIM – 版本,我可以看到标志' +python/dyn and +python3/dyn
'
但是,当我input命令':python import sys'时,我收到错误消息:
E448: Could not load library function _PyArg_Parse_SizeT E263: Sorry, this command is disabled, the Python library could not be loaded.
当我键入命令':python3 import sys'时,我得到错误信息:
E448: Could not load library function PySys_SetArgv E263: Sorry, this command is disabled, the Python library could not be loaded.
所有需要python的vim插件都不能正常工作。
请让我知道如何解决这个问题。
不幸的是,“动态”Python加载仅适用于Windows。 我也研究过这个,而且在任何其他操作系统上都没有。
Vim文档: http : //vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-dynamic指定:“在MS-Windows上,Python库可以动态加载。
基本上答案是:不,“动态”将无法在任何Mac / * nix系统上工作。
我在自己的系统上做的是编译两个版本的vim,一个是Python2,另一个是Python3的链接。 然后在我的.vimrc我包括一个版本检查使用正确的python exec插件等