如何在64位Mac OS X上构建32位版本的Python

时间:2017-10-11 18:28:54

标签: python macos tkinter upgrade

我有一个名为Tk的32位框架,我需要使用Python。问题是我必须制作一个32位版本的Python才能使用Tk(inter)。要为Linux执行此操作的说明必须使用--host和--build选项。这是一个这样的例子:./ configure - build = x86_64-pc-linux-gnu --host = i686-pc-linux-gnu。所以现在我想我只需要被告知要使用什么作为构建和主机选项。我的主机系统是64位。

有些人可能想知道我为什么要升级Tkinter?因为Mac OS 10.12附带的版本是8.5.9。它非常陈旧,并且有一些Tk 8.5.11修复的错误。由于我已经准备好了Tk框架8.5.11,我只需要创建Python就可以了。

我已经厌倦了这个:

./ configure --with-tcltk-includes =' - I / Library / Frameworks / Tcl.framework / Headers -I / Library / Frameworks / Tk.framework / Headers'--with-tcltk-libs ='/ Library / Frameworks / Tcl.framework / Versions / 8.5 / Tcl /Library/Frameworks/Tk.framework/Versions/8.5/Tk'CFLAGS =“ - arch i386”

它不起作用。这是我看到的错误消息:

ignoring file Python/pyctype.o, file was built for i386 which is not the architecture being linked (x86_64): Python/pyctype.o
Undefined symbols for architecture x86_64:
  "_PyObject_Free", referenced from:
      _getgrammar in pgenmain.o
  "_PyParser_ParseFile", referenced from:
      _getgrammar in pgenmain.o
  "__Py_ctype_table", referenced from:
      _PyTokenizer_Get in tokenizer_pgen.o
  "__Py_meta_grammar", referenced from:
      _getgrammar in pgenmain.o
  "__Py_pgen", referenced from:
      _getgrammar in pgenmain.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Parser/pgen] Error 1

0 个答案:

没有答案