我一直在试图编译VIM 7.3与蟒蛇2.7支持上MAC OS X 10.6。 Vim本身编译得很好,但是嵌入式python并没有太多。Vim的失败与Python编写关于OS X
我所采取的步骤:
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
这给了我一个工作的vim,但没有蟒蛇。
的自动/的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
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define UNIX 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define FEAT_HUGE 1
| #define USE_XSMP_INTERACT 1
| /* end confdefs.h. */
|
| int
| main()
| {
|
| ;
| return 0;
| }
configure:5408: result: no: PYTHON DISABLED
我得到这个错误我是否运行有或没有--with-python的-conf的-DIR选项来配置。它看起来像是-u _PyMac_Error Python.framework/Versions/2.7/Python
是问题的根源,但我不确定该从哪里出发。
有什么建议吗?
我正在运行10.6.7,并且最新的Apple提供的python是2.6。你确定你已经安装了2.7,它位于'System/Library/Frameworks/Python.framework /'中吗?如果你想使用不同的python,你可能需要在'./configure'时提供它的路径,或者确保它是默认的'python'。无论如何,MacVim带有全功能的命令行'vim',为什么不尝试呢? – romainl
Romaini,** python 2.7 **绝对安装在正确的位置,并设置为** Current ** python。无论我是否提供路径,'。/ configure'都不通过python检查。 '_PyMac_Error'位显然提供了导致问题的相对路径。 MacVim是我使用的,但我不知道我可以调用MacVim作为命令行应用程序。它实际上解决了这个问题,因为我已经将它编译为Python 2.7并且它是当前的Vim 7.3(mac 10.6 vim是7.2 - 这是我开始走这条路的原因)。 –
很酷。很抱歉,我一直无法帮助解决Python问题。我一次走同一条路(红宝石需要一些很酷的插件)。发现MacVim捆绑包中的'vim'可执行文件解决了许多问题。 – romainl