Sri*_*rik 5 python linux vim vim-plugin
我的Debian中有Python 2.7和Python 3.3.我使用arg重建了两个--enable-shared.
之后,我使用args" --enable-pythoninterp --enable-python3interp --with-features=huge --with-python-config-dir=PathToConfig --with-python3-config-dir=PathToConfig" 构建了VIM 7.4
当我发表评论vim --version时,我可以看到旗帜' +python/dyn and +python3/dyn'
但是,当我输入命令':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.
Run Code Online (Sandbox Code Playgroud)
当我输入命令':python3 import sys'时,我收到错误消息:
E448: Could not load library function PySys_SetArgv
E263: Sorry, this command is disabled, the Python library could not be loaded.
Run Code Online (Sandbox Code Playgroud)
由于这个原因,所有需要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。