vim在linux上加载python
发布时间:2020-12-15 22:32:27 所属栏目:安全 来源:网络整理
导读:我的Debian中有 Python 2.7和 Python 3.3.我使用arg –enable-shared重建了两个. 后比我建VIM 7.4使用ARGS“–enable-pythoninterp –enable-python3interp –with-功能=巨大–with-python的-配置-DIR = PathToConfig –with-python3-配置-DIR = PathToConfi
>我的Debian中有
Python 2.7和
Python 3.3.我使用arg –enable-shared重建了两个.
>后比我建VIM 7.4使用ARGS“–enable-pythoninterp –enable-python3interp –with-功能=巨大–with-python的-配置-DIR = PathToConfig –with-python3-配置-DIR = PathToConfig “ >当我发表评论vim –version时,我可以看到标志’python / dyn和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. 当我输入命令’:python3 import sys’时,我收到错误消息: E448: Could not load library function PySys_SetArgv E263: Sorry,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进行插件等. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |