Why doesn't tkinter import on CentOs 7

前端 未结 4 1871
孤独总比滥情好
孤独总比滥情好 2021-01-24 21:29

I have the python3-tkinter installed, as shown below:

$ sudo yum install python3-tkinter
[sudo] password for abigail: 
Loaded plugins: fastestmirror, langpacks
L         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-24 22:23

    For tkinter installation for Python3.5:

    1. yum -y install tkinter tcl-devel tk-devel
    2. vim ......./Python3.5.#/Modules/Setup.dist, remove the comment symbol before the following lines:

      _tkinter _tkinter.c tkappinit.c - -L/usr/local/lib \ -I/usr/local/include \ -ltk8.5 -ltcl8.5 \ #defualt as 8.2 -lX11

    3. configure and install

      ./configure make make install

提交回复
热议问题