0
点赞
收藏
分享

微信扫一扫

解决Windows系统Python3.X嵌入式发行版没有tkinter库问题

雪域迷影 2022-04-27 阅读 33
python

将常规Python发行版中的以下目录文件复制到嵌入式版本中即可:

1、将常规版本中tcl目录复制到嵌入式版本的安装目录中。

2、将常规版本中tkinter目录复制到嵌入式版本的安装目录的Lib/site-packages中。(必须是Lib/site-packages,不能在Lib中,不然失败)

3、在嵌入式版本中建一个DLLs文件夹,将常规版本中_tkinter.pyd tcl86t.dll tk86t.dll三个文件复制到嵌入式版本的安装目录/DLLs中。(或者直接放到安装目录中)

4、如果报错为"import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter'",在python3x._pth文件中添加一行,内容为:.\DLLs。
————————————————

举报

相关推荐

0 条评论