[英]Python: ttk cannot be installed
Although I have downloaded ttk
from https://pypi.python.org/pypi/pyttk/ and installed it using: 尽管我已经从https://pypi.python.org/pypi/pyttk/下载了
ttk
并使用以下命令进行了安装:
python setup.py install
and got: 并得到:
I still can't run my script which uses ttk: 我仍然无法运行使用ttk的脚本:
from Tkinter import ttk
ImportError: cannot import name ttk
What is wrong? 怎么了?
I think ttk
is installed as a top-level import. 我认为
ttk
是作为顶级导入安装的。 Try 尝试
import ttk
Try this instead: 尝试以下方法:
from Tkinter import *
import ttk
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.