|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
如题,各位大大,求帮忙!
环境:Win7 64bit、Python 3.6.3-32bit、Pyinstaller3.3.1(这个版本是支持Python3.6的吧)
情况是这样的:
首先,我只写了一个print语句,没有import任何东西,运行正常,打包成的exe也正常运行;
然后,又写了一个简单的UI界面,import tkinter,又加了一个按钮,界面如下:
- import tkinter
- app=tkinter.Tk()
- tkinter.Button(app,text='点点点').pack()
- app.mainloop()
复制代码 这个.py文件运行正常,用pyinstaller打包生成exe的过程也没报错,但是打开exe的时候报错了(Failed to execute script tkinter_form):
调试发现有ImportError内存位置访问无效,接下来就不知道怎么解决了,一直找不到有效的方法。。。
build下生成的warntkinter_form.txt内容如下(不知道怎么会有这么多missing项):
- missing module named resource - imported by posix, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named posix - imported by os, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named _posixsubprocess - imported by subprocess, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named 'org.python' - imported by pickle, E:\MyPython\packeg_hello\tkinter_form.py, xml.sax
- missing module named readline - imported by cmd, code, pdb, E:\MyPython\packeg_hello\tkinter_form.py
- excluded module named _frozen_importlib - imported by importlib, importlib.abc, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named _winreg - imported by platform, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named _scproxy - imported by urllib.request
- missing module named java - imported by platform, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named 'java.lang' - imported by platform, E:\MyPython\packeg_hello\tkinter_form.py, xml.sax._exceptions
- missing module named vms_lib - imported by platform, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named termios - imported by tty, E:\MyPython\packeg_hello\tkinter_form.py, getpass
- missing module named grp - imported by shutil, tarfile, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named pwd - imported by posixpath, shutil, tarfile, http.server, webbrowser, E:\MyPython\packeg_hello\tkinter_form.py, netrc, getpass
- missing module named _dummy_threading - imported by dummy_threading, E:\MyPython\packeg_hello\tkinter_form.py
- missing module named org - imported by copy, E:\MyPython\packeg_hello\tkinter_form.py
复制代码
各位大大,求帮忙!
|
|