如何确定我的 linux 机器上安装了哪个版本的 python3 tkinter? [英] How to determine what version of python3 tkinter is installed on my linux machine?

查看:39
本文介绍了如何确定我的 linux 机器上安装了哪个版本的 python3 tkinter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,一直在网上寻找有关如何执行此操作的答案,但没有直接答案.有谁知道我如何找到 tkinter 的版本号?

解决方案

在 Python 3 中,它是带有小 ttkinter,您需要导入它.因此:

<预><代码>>>>导入 tkinter>>>tkinter.TkVersion8.6

如果你没有导入它,你会得到你提到的错误.

Hi have been scavenging the web for answers on how to do this but there was no direct answer. Does anyone know how I can find the version number of tkinter?

解决方案

In Python 3, it's tkinter with a small t, and you need to import it. Thus:

>>> import tkinter
>>> tkinter.TkVersion
8.6

If you didn't import it, you'd get the error you mentioned.

这篇关于如何确定我的 linux 机器上安装了哪个版本的 python3 tkinter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆