vim可以用来编译python吗_vim编译错误的python版本(而不是使用所需的版本)

简单来说:

我有一个问题,编译vim与首选python版本。

当我使用–enable-pythoninterp它编译与系统OSX python版本。

当我使用–enable-pythoninterp = dynamic时,我在尝试:py import sys时在vim中收到错误

这是我正在做的更详细的内容:

% git clone https://github.com/b4winckler/macvim.git

% cd macvim

% ./configure --enable-pythoninterp \

--with-python-config-dir=/usr/local/lib/python2.7/config

...

checking for python... /usr/local/bin/python

checking Python version... 2.7

checking Python is 1.4 or better... yep

checking Python's install prefix... /usr/local

checking Python's execution prefix... /usr/local

checking Python's configuration directory... /usr/local/lib/python2.7/config

...

% make

...

** BUILD SUCCEEDED **

% open src/MacVim/build/Release/MacVim.app

在打开的MacVim我的类型:

:py import sys; print (sys.version, sys.executable)

('2.6.1 (r261:67515, Jun 24 2010, 21:47:49)

[GCC 4.2.1 (Apple Inc. build 5646)]',

'/usr/bin/python')

为什么是2.6.1?

为什么/ usr / bin / python?

我的默认python是2.7!它存在于/usr/local/bin / python

我一整天都在寻找解决方案。我找到了这是=dynamic属性(但是这个解决方案没有解释)。

之后,我尝试用动态python重新编译vim:

% ./configure --enable-pythoninterp=dynamic

... output the same ...

% make

% open src/MacVim/build/Release/MacVim.app

打开MacVim:

:py import sys

这里有一个错误:

E370: Could not load library libpython2.7.a

E263: Sorry, this command is disabled, the Python library could not be loaded.

我的OSX版本是10.6.8。

默认python版本是2.7。

% which python

/usr/local/bin/python

有没有人可以在编译过程中解释python如何集成到vim中?

和如何修复与libpython2.7.a错误?

更新:我不再有这个问题描述的环境。所以我无法测试新的答案。但是,人类的剩余部分将会感谢你的帮助。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值