2016-11-03 42 views
0

我使用Python 2.7的Windows 8pyinstaller - 导入错误:没有模块名为Tkinter的(决定所有变体)

当我面对这个问题,它仍然不知道它拥有多少陷阱。在这里,我想介绍我遇到和测试过的所有选项,以及我最终帮助的选项。

1)我检查了模块Tkinter or tkinter使用的拼写。

2)我了解如何使用pyinstaller,在项目模块使用时:tkintermatplotlib然后能够放弃matplotlib,但它也没有影响到解决我的问题。

3)从与所述参数pPyInstaller -y -F --distpath="." -p "C:\Python27\Lib\lib-tk" test.py

4的命令行)只连接模块https://groups.google.com/forum/#!topic/pyinstaller/vtbKKt6v0is

5)使用pyinstaller选项--hiddenimport=Tkinter的必要部分将路径添加到模块和评论行excludedimports文件\PyInstaller\hooks\hook-PIL.pyhook-PIL.SpiderImagePlugin.pyhttps://github.com/pyinstaller/pyinstaller/issues/1584

回答

0

什么帮我解决这个问题:

1)删除Python

2)备份遗留物来自Python的文件夹。

3)删除安装Python的文件夹(我的问题没有解决没有这个项目)。

4)安装新的Python和所有必要的模块。

继这些简单的操作之后,事情就开始发挥作用:)

相关问题