huataihuang / cloud-atlas

云计算指南
https://cloud-atlas.readthedocs.io/
995 stars 173 forks source link

zh-cn/latest/python/startup/build_python3_in_centos7 #41

Open utterances-bot opened 7 months ago

utterances-bot commented 7 months ago

在CentOS 7环境源码编译Python 3 — Cloud Atlas beta 文档

https://cloud-atlas.readthedocs.io/zh-cn/latest/python/startup/build_python3_in_centos7.html

winyMu commented 7 months ago

“Python 3不支持 _tkinter 模块问题” 博主现在有解决么?

huataihuang commented 7 months ago

“Python 3不支持 _tkinter 模块问题” 博主现在有解决么?

没有解决,我没有这个需求,所以绕过去了

mahorozte commented 5 months ago

pkg-config无法找到tk&tcl的头文件或者库文件,检查一下你的tk.pc或者是tcl.pc文件

feshoo commented 5 months ago

要指定环境变更 TCLTK_LIBS=,例如: TCLTK_LIBS="-ltk8.5 -ltcl8.5" ./configure --enable-optimizations --with-lto --with-computed-gotos --with-system-ffi \ --with-ensurepip=install --with-openssl=/usr/local/openssl11

2530loong commented 3 months ago

在 RHEL 7 和 CentOS 7 上,开发包未提供 tcl.pc 和 tk.pc 文件。你需要使用以下方式设置 TCLTK_LIBS:TCLTK_LIBS="-ltk8.5 -ltkstub8.5 -ltcl8.5"。

https://github.com/python/cpython/blob/main/Doc/whatsnew/3.11.rst#build-changes

The necessary bits to build these optional modules were not found: _tkinter

tk-devel-8.5.13-6.el7.x86_64

yum install tk-devel -y export TCLTK_LIBS="-ltk8.5 -ltkstub8.5 -ltcl8.5"