相关疑难解决方法(0)

vim编译错误的python版本(并没有使用所需的版本)

简单来说:

我有一个问题,用首选的python版本编译vim.
当我使用--enable-pythoninterp它时编译系统OSX python版本.
当我使用时,--enable-pythoninterp=dynamic我在尝试时在vim中出错:py import sys

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

% git clone https://github.com/b4winckler/macvim.git
% cd macvim
% ./configure --enable-pythoninterp \
     --with-python-config-dir=/usr/local/lib/python2.7/config <- this option has no affects on result
...
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
Run Code Online (Sandbox Code Playgroud)

在打开的MacVim I中输入:

:py import sys; …
Run Code Online (Sandbox Code Playgroud)

python macos vim compilation

25
推荐指数
5
解决办法
7914
查看次数

Vim无法在OS X上使用python进行编译

我一直在尝试使用mac OS X 10.6上的python 2.7支持编译vim 7.3.Vim本身编译得很好,但嵌入式python并没有那么多.

我采取的步骤:

hg clone https:/vim.googlecode.com/hg/ vim
cd vim/src
./configure --without-x --disable-gui --disable-darwin \
            --enable-pythoninterp --with-features=huge
make
make install
Run Code Online (Sandbox Code Playgroud)

这给了我一个工作的vim但没有python.

自动/的config.log表示有一个文件错误:

configure:5387: checking if compile and link flags for Python are sane
configure:5404: gcc -o conftest -g -O2 
     -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
     -DPYTHON_HOME=\"/Library/Frameworks/Python.framework/Versions/2.7\"   
     -L/usr/local/lib conftest.c  
     -L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config 
     -lpython2.7 -ldl -framework CoreFoundation 
     -u _PyMac_Error Python.framework/Versions/2.7/Python >&5
i686-apple-darwin10-gcc-4.2.1: Python.framework/Versions/2.7/Python: No such file or directory

<command-line>: warning: missing terminating " character
configure:5404: $? = 1 …
Run Code Online (Sandbox Code Playgroud)

python macos vim compilation

7
推荐指数
2
解决办法
4557
查看次数

标签 统计

compilation ×2

macos ×2

python ×2

vim ×2