本人运行的环境是Centos7.9+Python3.6,运行脚本中包含import tkinter。报错如下图:
原因是Linux环境下Python环境没有内置tkinter模块(在windows环境是内置好的,可以直接用)
解决方法为手动安装tkinter模块
1 yum install python3-tkinter
安装完成后,再运行tkinter代码就成功了。
- python3 tkinter 方法 centos pythonpython3 tkinter方法centos python3 tkinter python module centos7 python3 centos python python3 centos python python3 centos python numpy mysqlclient python3 centos python centos6 python3 django1 centos python3教程centos python python3 centos python module openssl1 python3 openssl centos