【发布时间】:2016-01-24 21:01:00
【问题描述】:
我使用一些导入在 python 中创建了一个小程序:
splinter、Tkinter、webbrwoser、urllib 和 re
该程序有一个 GUI(通过 tkinter),当我通过命令行运行它时一切正常。
然而,当我尝试使用 these instructions 创建可执行文件时,似乎一切正常,但是当我实际运行 .exe 文件时,我得到了以下错误:
C:\Python27\dist>pypy.exe
Traceback (most recent call last):
File "pypy.py", line 1, in <module>
ImportError: No module named splinter
这是我用来获取.exe文件的代码:
from distutils.core import setup
import py2exe
setup(console=['pypy.py'])
所以我猜(在阅读了this SO 帖子之后)这个问题与我的 dist 文件夹中丢失的文件有关,但是对于我的生活,我不确定从这里去哪里.
请帮助我使我的 GUI python 程序工作。
提前致谢,
乔纳
【问题讨论】:
标签: python user-interface tkinter exe splinter