【发布时间】:2016-06-12 18:42:20
【问题描述】:
在 redhat 6 上尝试从源代码编译新 Python 时,你们中是否有人遇到过缺少 tkInter 的问题?
“未找到构建这些可选模块的必要位: _tkinter 要找到必要的位,请在 detect_modules() 中的 setup.py 中查找模块名称。 未能构建这些模块: binascii zlib"
这是公司内部机器。我可以访问 yum,但仅此而已。 Yum 只找到与系统 Python 相关的 tkInter 版本,即 2.6.6。
我可能在这里缺少任何 tkInter 依赖项吗? 列表更长,但安装几个库有帮助。 我仍然坚持最后一个并且没有想法。
感谢您的帮助。
【问题讨论】:
-
安装
tk-devel有帮助吗? -
一般来说,在 Linux 上构建 python 需要单独安装 tcl/tk,有时还需要为 tkinter/idle/turtle 安装单独的 python-tkinter 包。详细信息取决于 linux 发行商,也可能取决于版本。如果 Chris 的回答不起作用,请尝试寻找 python-devel 或 *devel。如果您在此处得到 RH 6.4 答案,请尝试使用 RedHat 列表或 python-list,后者可通过 news.gmane.org 访问。
-
大家好,很抱歉回复晚了。这是一个虚拟机,所以我回滚到快照并从头开始。 Chris 的建议很好,现在我没有收到 tkInter 缺失异常,但还是有问题。
-
这就是现在的样子。没有关于它为什么失败的明确消息(我只是在我得到错误之前粘贴最后一行):“gcc -pthread -shared build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1 /Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python -3.5.1/Modules/_ctypes/callproc.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/stgdict.o build/temp.linux-x86_64-3.5/tmp /PYTHON/Python-3.5.1/Modules/_ctypes/cfield.o ...
-
build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/libffi/src/prep_cif.o build/temp.linux-x86_64-3.5/tmp /PYTHON/Python-3.5.1/Modules/_ctypes/libffi/src/closures.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ ffi64.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.o build/temp.linux-x86_64-3.5/tmp/PYTHON/ Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-x86_64-3.5/tmp/PYTHON/Python-3.5.1/Modules/_ctypes/libffi/src/x86/sysv .o -L/usr/local/lib -o ...
标签: python tkinter redhat zlib binascii