gpt4 book ai didi

python - 官方 gVim Windows 二进制文件是否预编译为可与 Python 3 一起使用?

转载 作者:可可西里 更新时间:2023-11-01 09:25:37 27 4
gpt4 key购买 nike

我从官方 VIM.org 网站下载了 gVim73_46.exe 并安装了它的完整组件,我使用 Python 3.2 进行开发(但如果它更可能与 VIM 一起工作,我会选择 3.1)。

运行 vim --version 命令给我一个 -python -python3 结果。但是,在 Vim 中运行 :echo has("python") 会得到 1(真)。这是否意味着我的 Vim 是否支持 Python 2?

对于 Python 3,运行 :py3 命令会得到 E370: Could not load library python31.dll。这是否意味着它是为支持 Python 3.1 而构建的?如果是,我可以让它使用我的 3.2 吗?

如果没有,是否有任何来源可以获得支持 Python 3 (+python3) 的预编译 Windows 二进制文件?

最佳答案

来自 :help python3:

Vim can be built in four ways (:version output):
1. No Python support (-python, -python3)
2. Python 2 support only (+python or +python/dyn, -python3)
3. Python 3 support only (-python, +python3 or +python3/dyn)
4. Python 2 and 3 support (+python/dyn, +python3/dyn)

When Python 2 and Python 3 are both supported they must be loaded dynamically.

running :py3 commands gives E370: Could not load library python31.dll. Does that mean it's built to support Python 3.1?

是的。如果你得到 python 3.1 并正确设置你的路径,vim 应该有 python。

can I make it use my 3.2?

不,vim 被编译为期望某个接口(interface),所以你需要一个匹配的库。

关于python - 官方 gVim Windows 二进制文件是否预编译为可与 Python 3 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11731401/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com