1.Python自学之路-Tkinter/PIL/numpy/pickle/

使用Tkinter、pickle、numpy和PIL等库构建了一个个人信息管理系统,实现了用户信息的录入、显示和删除功能。

写在前面
刚开始学习Tkinter,看了一些资料感觉还是自己动手能够学习的更快,所以有了下面的这个自己想出来的个人信息管理系统;
最开始只是想用tkinter的一些基本方法弄弄就算了,最后一发不可收拾,很多库函数都是重新查资料找的,用的不好,大家见笑~~
1.定义Tkinter主界面(包括3个按键);
2.根据3个按键创建对应函数的功能;
3.用pickle新建几个文件保存到文件中;
4.显示个人界面将这些数据显示出来,其中图像存储和显示用到了numpy,PIL;
5.删除个人信息用了Tkinter的Listbox方法
6.录入个人信息用到了filedialog
全部代码如下,第一次写这么长的代码

#coding=UTF-8
# __author__ = "晒晒小木桩"

import tkinter as tk
import pickle
import bisect
import os
from PIL import Image, ImageTk
from tkinter import filedialog
import numpy
from tkinter import messagebox

root = tk.Tk()
root.title("个人信息系统")
root.geometry("400x220")
root.resizable(0, 0)
photo = Image.open("Background.jpg")
photo_tk = ImageTk.PhotoImage(photo)
tk.Label(root,image=photo_tk).place(x=0,y=0)
personal_number = 0  #每次打开初始化显示第一个用户

#获取存放用户数据的数据库,保存到新列表(需要在执行文件根目录创建1个名为personal_info.pkl的文件)
if os.path.getsize("personal_info.pkl") > 0:
    with open("personal_info.pkl", "rb") as file:
        personal_info = pickle.load(file)
        file.close()
else:
    list_create = []
    with open("personal_info.pkl", "wb") as file:
        pickle.dump(list_create, file)
        file.close()

#------------------------------------------------------------------------------------------------------
def login():
    #新建录入窗口
    window_login=tk.Toplevel()
    window_login.title("录入信息")
    window_login.geometry("350x350")
    window_login.resizable(0,0)

    #新建个人信息标题
    tk.Label(window_login,text="姓名:", heigh=2).grid(row=0,column=0,sticky="E", ipadx=40, ipady=10)
    tk.Label(window_login,text="名族:", heigh=2).grid(row=1,column=0,sticky="E", ipadx=40, ipady=10)
    tk.Label(window_login, text="手机号:", heigh=2).grid(row=2,column=0,sticky="E", ipadx=40, ipady=10)
    tk.Label(window_login, text="身份证号:", heigh=2).grid(row=3,column=0,sticky="E", ipadx=40, ipady=10)

    #新建录入框
    e1 = tk.Entry(window_login)
    e1.grid(row=0, column=1)
    e2 = tk.Entry(window_login)
    e2.grid(row=1, column=1)
    e3 = tk.Entry(window_login)
    e3.grid(row=2, column=1)
    e4 = tk.Entry(window_login)
    e4.grid(row=3, column=1)
    e5 = tk.Entry(window_login)
    e5.grid(row=4, column=1)

    #新建添加照片的选项
    def photo_insert():
        global photo_array
        photo_path=tk.filedialog.askopenfilename(parent=window_login)
        e5.insert("end",photo_path)
    tk.Label(window_login,text="注:照片格式必须为.gif,大小为200x200").grid(row=6, column=0, columnspan=4, sticky="W", ipadx=40, ipady=10)
    tk.Button(window_login,text="请选择照片",command=photo_insert).grid(row=4, column=0)

    #执行按下确认按键后的操作
    def sure():
        global personal_info
        p5 = Image.open(e5.get())
        p6 = p5.convert("RGB")
        photo_array = numpy.asarray(p6)
        bisect.insort(personal_info, (e1.get(), e2.get(), e3.get(), e4.get(), photo_array))
        with open("personal_info.pkl", "wb") as file:
            pickle.dump(personal_info, file)
            file.close()
        e1.delete(0, "end")
        e2.delete(0, "end")
        e3.delete(0, "end")
        e4.delete(0, "end")
        e5.delete(0, "end")
        tk.messagebox.showinfo(title="录入成功", message="个人信息已经录入成功了!")

    #确认录入信息
    tk.Button(window_login, text="确认录入", command=sure).grid(row=5, column=0, columnspan=3)
#------------------------------------------------------------------------------------------------------
def information(): #显示个人信息
    #新建顶级窗口,不允许修改大小
    window_info=tk.Toplevel()
    window_info.title("个人信息")
    window_info.geometry("600x350")
    window_info.resizable(0,0)
    global personal_info
    global personal_number

    #新建个人信息Lable和下划线
    tk.Label(window_info, text="姓名:", heigh=2).grid(row=0, column=0, sticky="E", ipadx=40, ipady=10)
    tk.Label(window_info, text="名族:", heigh=2).grid(row=1, column=0, sticky="E", ipadx=40, ipady=10)
    tk.Label(window_info, text="手机号:", heigh=2).grid(row=2, column=0, sticky="E", ipadx=40, ipady=10)
    tk.Label(window_info, text="身份证号:", heigh=2).grid(row=3, column=0, sticky="E", ipadx=40, ipady=10)
    for i in range(4):
        can = tk.Canvas(window_info, width=150, heigh=40)
        infor_lab = can.create_line(0, 33, 150, 33, fill="black")
        can.grid(row=i, column=1)

    #定义按键后显示个人资料
    str1 = tk.StringVar()
    str2 = tk.StringVar()
    str3 = tk.StringVar()
    str4 = tk.StringVar()
    l1 = tk.Label(window_info, textvariable=str1)
    l1.grid(row=0, column=1)
    l2 = tk.Label(window_info, textvariable=str2)
    l2.grid(row=1, column=1)
    l3 = tk.Label(window_info, textvariable=str3)
    l3.grid(row=2, column=1)
    l4 = tk.Label(window_info, textvariable=str4)
    l4.grid(row=3, column=1)

    def print_info():
        global personal_number, personal_info
        str1.set(personal_info[personal_number][0])
        str2.set(personal_info[personal_number][1])
        str3.set(personal_info[personal_number][2])
        str4.set(personal_info[personal_number][3])
    print_info()

    #如果已经翻到最前面或者最后面有提示
    def detected(str):
        global personal_number
        if str == -1:
            tk.Label(window_info, text="已经是第一个了~~~").grid(row=4, column=0, columnspan=2, ipadx=40, ipady=20)
        if str == 1:
            tk.Label(window_info, text="已经是最后一个了~~~").grid(row=4, column=0, columnspan=2, ipadx=40, ipady=20)
        if str == 0:
            tk.Label(window_info, text="                    ").grid(row=4, column=0, columnspan=2, ipadx=40, ipady=20)
    detected(0)

    #按键后显示下一个人,判断是不是最后一个人
    def next():
        global personal_number
        if personal_number == len(personal_info)-1:
            detected(1)
            photo_display()
        else:
            detected(0)
            personal_number = personal_number + 1
            photo_display()
            print_info()

    #按键显示前一个人,判断是不是第一个人
    def last():
        global personal_number
        if personal_number == 0:
            detected(-1)
            photo_display()
        else:
            detected(0)
            personal_number = personal_number - 1
            photo_display()
            print_info()

    #创建上下翻按键
    tk.Button(window_info,text="上一页",command=last).grid(row=5,column=0,columnspan=2,ipadx=40)
    tk.Button(window_info,text="下一页",command=next).grid(row=5,column=2,columnspan=2,sticky="W",ipadx=40)

    #从数组中导入Tkinter可以显示的照片
    def photo_display():
        global p_tk, personal_number, personal_info
        p_array = personal_info[personal_number][4]
        p_show = Image.fromarray(p_array)
        p_tk = ImageTk.PhotoImage(p_show)
        ck = tk.Canvas(window_info, width=400, heigh=200)
        p1 = ck.create_image(150, 0, anchor='n', image=p_tk)
        ck.grid(row=0, column=2, rowspan=4)
    photo_display()
    window_info.mainloop()

#------------------------------------------------------------------------------------------------------
def delete():
    #定义可以删除个人信息的Listbox
    global personal_info
    delete_info = tk.Toplevel()
    var_str = tk.StringVar()
    list1 = tk.Listbox(delete_info)

    #把个人信息列表导入一个新列表
    new_list = []
    for x in personal_info:
        new_list.append(x)
        list1.insert("end", x[0])
        list1.pack()

    #删除当前选中的信息
    def dele():
        global personal_info,personal_number
        list_number=list1.index(list1.curselection())
        new_list.remove(new_list[list_number])
        personal_number = 0
        list1.delete(list_number)
        with open("personal_info.pkl", "wb") as file:
            personal_info=new_list
            pickle.dump(new_list, file)
            file.close()

    #删除全部信息
    def dele_all():
        global personal_info,personal_number
        personal_number = 0
        new_list = []
        list1.delete(0,"end")
        with open("personal_info.pkl", "wb") as file:
            personal_info=new_list
            pickle.dump(new_list, file)
            file.close()

    tk.Button(delete_info,text="删除",command=dele).pack()
    tk.Button(delete_info,text="删除全部",command=dele_all).pack()
    delete_info.mainloop()

#设置顶级按键窗口
tk.Label(root, text="个 人 信 息 系 统", font=("微软雅黑",10), bg="green").place(x=150, y=10)
tk.Button(root, text="录入", command=login, width=10).place(x=160, y=75)
tk.Button(root, text="查看", command=information, width=10).place(x=160, y=125)
tk.Button(root, text="删除", command=delete, width=10).place(x=160, y=175)
root.mainloop()

上面代码部分参考了很多人的文章,全部列表如下,谢谢大家~~~
1.Tkinter讲解
2.图片保存为RGB
3.Numpy介绍
4.PIL和Numpy
5.OS模块

最后放几张截图吧~

主界面 ↓
主界面
录入信息↓
录入信息
录入成功提示↓
录入成功提示
显示信息↓

显示信息删除用户↓
删除用户

PS D:\实时建模\实时建模V3> pyinstaller --onefile --add-data "文件服务2.py;." --add-data "Progress.ini;." --add-data "imgs.ini;." --windowed --icon='icon.ico' 实时三维进度条版本三.py --clean 164 INFO: PyInstaller: 6.11.1, contrib hooks: 2025.0 164 INFO: Python: 3.9.0 164 INFO: Platform: Windows-10-10.0.26100-SP0 164 INFO: Python environment: d:\python39 167 INFO: wrote D:\实时建模\实时建模V3\实时三维进度条版本三.spec 169 INFO: Removing temporary files and cleaning cache in C:\Users\云实\AppData\Local\pyinstaller 176 INFO: Module search paths (PYTHONPATH): ['D:\\Python39\\Scripts\\pyinstaller.exe', 'd:\\python39\\python39.zip', 'd:\\python39\\DLLs', 'd:\\python39\\lib', 'd:\\python39', 'd:\\python39\\lib\\site-packages', 'd:\\python39\\lib\\site-packages\\win32', 'd:\\python39\\lib\\site-packages\\win32\\lib', 'd:\\python39\\lib\\site-packages\\Pythonwin', 'D:\\实时建模\\实时建模V3'] 503 INFO: Appending 'datas' from .spec 503 INFO: checking Analysis 503 INFO: Building Analysis because Analysis-00.toc is non existent 503 INFO: Running Analysis Analysis-00.toc 503 INFO: Target bytecode optimization level: 0 503 INFO: Initializing module dependency graph... 503 INFO: Initializing module graph hook caches... 515 INFO: Analyzing base_library.zip ... 1085 INFO: Processing standard module hook 'hook-heapq.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 1170 INFO: Processing standard module hook 'hook-encodings.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 1782 INFO: Processing standard module hook 'hook-pickle.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2234 INFO: Caching module dependency graph... 2303 INFO: Looking for Python shared library... 2314 INFO: Using Python shared library: d:\python39\python39.dll 2314 INFO: Analyzing D:\实时建模\实时建模V3\实时三维进度条版本三.py 2327 INFO: Processing standard module hook 'hook-PyQt5.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2402 INFO: Processing standard module hook 'hook-PyQt5.QtWidgets.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2496 INFO: Processing standard module hook 'hook-PyQt5.QtCore.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2606 INFO: Processing standard module hook 'hook-PyQt5.QtWebEngineWidgets.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2679 INFO: Processing standard module hook 'hook-PyQt5.QtGui.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 2969 INFO: Processing standard module hook 'hook-PyQt5.QtWebChannel.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 3126 INFO: Processing pre-safe-import-module hook 'hook-typing_extensions.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 3127 INFO: SetuptoolsInfo: initializing cached setuptools info... 3754 INFO: Processing standard module hook 'hook-charset_normalizer.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 3806 INFO: Processing standard module hook 'hook-certifi.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 3868 INFO: Processing pre-safe-import-module hook 'hook-distutils.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 3869 INFO: Processing pre-find-module-path hook 'hook-distutils.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path' 3870 INFO: Processing standard module hook 'hook-distutils.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 3899 INFO: Processing standard module hook 'hook-pywintypes.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 4100 INFO: Processing pre-find-module-path hook 'hook-tkinter.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path' 4100 INFO: TclTkInfo: initializing cached Tcl/Tk info... 4269 INFO: Processing standard module hook 'hook-_tkinter.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 4299 INFO: Processing standard module hook 'hook-psutil.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 4327 INFO: Processing standard module hook 'hook-cv2.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 4763 INFO: Processing standard module hook 'hook-numpy.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 5636 INFO: Processing standard module hook 'hook-platform.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 5845 INFO: Processing standard module hook 'hook-difflib.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 5912 INFO: Processing standard module hook 'hook-multiprocessing.util.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 5939 INFO: Processing standard module hook 'hook-xml.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 6176 INFO: Processing standard module hook 'hook-sysconfig.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 6681 INFO: Processing standard module hook 'hook-PIL.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 6718 INFO: Processing standard module hook 'hook-PIL.Image.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7002 INFO: Processing standard module hook 'hook-xml.etree.cElementTree.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7016 INFO: Processing standard module hook 'hook-PIL.ImageFilter.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7203 INFO: Processing module hooks (post-graph stage)... 7314 INFO: Processing standard module hook 'hook-PIL.SpiderImagePlugin.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7343 WARNING: Hidden import "sip" not found! 7360 INFO: Processing standard module hook 'hook-_tkinter.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7361 INFO: Processing standard module hook 'hook-PyQt5.QtNetwork.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7522 INFO: Processing standard module hook 'hook-PyQt5.QtPrintSupport.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7602 INFO: Processing standard module hook 'hook-PyQt5.QtQuick.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7684 INFO: Processing standard module hook 'hook-PyQt5.QtQuickWidgets.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7754 INFO: Processing standard module hook 'hook-PyQt5.QtWebEngineCore.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7880 INFO: Processing standard module hook 'hook-PyQt5.QtPositioning.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 7981 INFO: Processing standard module hook 'hook-PyQt5.QtQml.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 8801 INFO: Performing binary vs. data reclassification (2426 entries) 9145 INFO: Looking for ctypes DLLs 9153 INFO: Analyzing run-time hooks ... 9157 INFO: Including run-time hook 'pyi_rth_inspect.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks' 9157 INFO: Including run-time hook 'pyi_rth_pkgutil.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks' 9160 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks' 9161 INFO: Including run-time hook 'pyi_rth__tkinter.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks' 9162 INFO: Including run-time hook 'pyi_rth_pywintypes.py' from 'd:\\python39\\lib\\site-packages\\_pyinstaller_hooks_contrib\\rthooks' 9163 INFO: Including run-time hook 'pyi_rth_pyqt5.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\rthooks' 9164 INFO: Processing pre-find-module-path hook 'hook-_pyi_rth_utils.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path' 9165 INFO: Processing standard module hook 'hook-_pyi_rth_utils.py' from 'd:\\python39\\lib\\site-packages\\PyInstaller\\hooks' 9221 INFO: Looking for dynamic libraries d:\python39\lib\site-packages\PyInstaller\building\build_main.py:226: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47. __import__(package) 9620 INFO: Extra DLL search directories (AddDllDirectory): ['d:\\python39\\lib\\site-packages\\PyQt5\\Qt5\\bin', 'd:\\python39\\lib\\site-packages\\numpy.libs', 'D:\\Python39\\Lib\\site-packages\\cv2\\../../x64/vc14/bin'] 9620 INFO: Extra DLL search directories (PATH): ['D:\\Python39\\Lib\\site-packages\\cv2\\../../x64/vc14/bin', 'd:\\python39\\lib\\site-packages\\PyQt5\\Qt5\\bin'] 12436 INFO: Warnings written to D:\实时建模\实时建模V3\build\实时三维进度条版本三\warn-实时三维进度条版本三.txt 12478 INFO: Graph cross-reference written to D:\实时建模\实时建模V3\build\实时三维进度条版本三\xref-实时三维进度条版本三.html 12523 INFO: checking PYZ 12523 INFO: Building PYZ because PYZ-00.toc is non existent 12523 INFO: Building PYZ (ZlibArchive) D:\实时建模\实时建模V3\build\实时三维进度条版本三\PYZ-00.pyz 12980 INFO: Building PYZ (ZlibArchive) D:\实时建模\实时建模V3\build\实时三维进度条版本三\PYZ-00.pyz completed successfully. 13020 INFO: checking PKG 13020 INFO: Building PKG because PKG-00.toc is non existent 13020 INFO: Building PKG (CArchive) 实时三维进度条版本三.pkg 42433 INFO: Building PKG (CArchive) 实时三维进度条版本三.pkg completed successfully. 42460 INFO: Bootloader d:\python39\lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe 42460 INFO: checking EXE 42460 INFO: Building EXE because EXE-00.toc is non existent 42462 INFO: Building EXE from EXE-00.toc 42462 INFO: Copying bootloader EXE to D:\实时建模\实时建模V3\dist\实时三维进度条版本三.exe 42465 INFO: Copying icon to EXE 42471 INFO: Copying 0 resources to EXE 42471 INFO: Embedding manifest in EXE 42474 INFO: Appending PKG archive to EXE 42564 INFO: Fixing EXE headers 43073 INFO: Building EXE from EXE-00.toc completed successfully. PS D:\实时建模\实时建模V3>
09-18
Windows PowerShell 版权所有(C) Microsoft Corporation。保留所有权利。 安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows (.venv) PS E:\PyCharmObject\emailSingUp\SignUp> python -m venv packaging_env (.venv) PS E:\PyCharmObject\emailSingUp\SignUp> packaging_env\Scripts\activate (packaging_env) PS E:\PyCharmObject\emailSingUp\SignUp> pyinstaller -F -w -i outlook.ico AccountRegisterApp.py 116 INFO: PyInstaller: 6.15.0, contrib hooks: 2025.8 116 INFO: Python: 3.9.13 131 INFO: Platform: Windows-10-10.0.26100-SP0 131 INFO: Python environment: E:\DEMO\python-demo\.venv 131 INFO: wrote E:\PyCharmObject\emailSingUp\SignUp\AccountRegisterApp.spec 131 INFO: Module search paths (PYTHONPATH): ['E:\\DEMO\\python-demo\\.venv\\Scripts\\pyinstaller.exe', 'E:\\Program Files\\Python3.9\\python39.zip', 'E:\\Program Files\\Python3.9\\DLLs', 'E:\\Program Files\\Python3.9\\lib', 'E:\\Program Files\\Python3.9', 'E:\\DEMO\\python-demo\\.venv', 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages', 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\setuptools\\_vendor', 'E:\\PyCharmObject\\emailSingUp\\SignUp'] 380 INFO: checking Analysis 401 INFO: Building because inputs changed 401 INFO: Running Analysis Analysis-00.toc 401 INFO: Target bytecode optimization level: 0 401 INFO: Initializing module dependency graph... 401 INFO: Initializing module graph hook caches... 413 INFO: Analyzing modules for base_library.zip ... 885 INFO: Processing standard module hook 'hook-heapq.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 981 INFO: Processing standard module hook 'hook-encodings.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 1572 INFO: Processing standard module hook 'hook-pickle.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 2079 INFO: Caching module dependency graph... 2098 INFO: Looking for Python shared library... 2106 INFO: Using Python shared library: E:\Program Files\Python3.9\python39.dll 2106 INFO: Analyzing E:\PyCharmObject\emailSingUp\SignUp\AccountRegisterApp.py 2106 INFO: Processing pre-find-module-path hook 'hook-tkinter.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path' 2106 INFO: TclTkInfo: initializing cached Tcl/Tk info... 2248 INFO: Processing standard module hook 'hook-_tkinter.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 2280 INFO: Processing standard module hook 'hook-pandas.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 3137 INFO: Processing standard module hook 'hook-_ctypes.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 3147 INFO: Processing standard module hook 'hook-platform.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 3162 INFO: Processing standard module hook 'hook-sysconfig.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 3172 INFO: Processing standard module hook 'hook-numpy.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 3984 INFO: Processing standard module hook 'hook-difflib.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 4064 INFO: Processing standard module hook 'hook-multiprocessing.util.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 4103 INFO: Processing standard module hook 'hook-xml.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 4731 INFO: Processing standard module hook 'hook-charset_normalizer.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 4775 INFO: Processing pre-safe-import-module hook 'hook-typing_extensions.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 4775 INFO: SetuptoolsInfo: initializing cached setuptools info... 7047 INFO: Processing standard module hook 'hook-pytz.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 8229 INFO: Processing standard module hook 'hook-pandas.io.formats.style.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 9298 INFO: Processing standard module hook 'hook-pandas.plotting.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 9580 INFO: Processing standard module hook 'hook-openpyxl.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 9713 INFO: Processing standard module hook 'hook-xml.etree.cElementTree.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 9948 INFO: Processing standard module hook 'hook-PIL.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 9998 INFO: Processing standard module hook 'hook-PIL.Image.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 10309 INFO: Processing standard module hook 'hook-PIL.ImageFilter.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 11031 INFO: Processing standard module hook 'hook-sqlite3.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 11265 INFO: Processing standard module hook 'hook-pandas.io.clipboard.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 11265 INFO: Processing standard module hook 'hook-qtpy.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 11334 WARNING: QtLibraryInfo(PyQt5): failed to obtain Qt library info: Child process call to _read_qt_library_info() failed with: File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\qt\__init__.py", line 198, in _read_qt_library_info QtCore = importlib.import_module('.QtCore', package) File "E:\Program Files\Python3.9\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 666, in _load_unlocked File "<frozen importlib._bootstrap>", line 565, in module_from_spec File "<frozen importlib._bootstrap_external>", line 1173, in create_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed ImportError: DLL load failed while importing QtCore: 找不到指定的程序。 A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\qt\__init__.py", line 198, in _read_qt_library_info QtCore = importlib.import_module('.QtCore', package) File "E:\Program Files\Python3.9\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 11562 INFO: hook-qtpy: selected 'PySide2' as the only available Qt bindings. 11563 INFO: Processing pre-safe-import-module hook 'hook-packaging.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 11571 INFO: Processing standard module hook 'hook-PySide2.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 11614 INFO: Processing standard module hook 'hook-PySide2.QtNetwork.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 337, in _get_module_file_attribute loader = importlib.util.find_spec(package).loader File "E:\Program Files\Python3.9\lib\importlib\util.py", line 94, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\qt\__init__.py", line 670, in _check_if_openssl_enabled QtCore = importlib.import_module('.QtCore', package) File "E:\Program Files\Python3.9\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 12364 INFO: Processing standard module hook 'hook-PySide2.QtCore.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 337, in _get_module_file_attribute loader = importlib.util.find_spec(package).loader File "E:\Program Files\Python3.9\lib\importlib\util.py", line 94, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 12580 INFO: Processing standard module hook 'hook-PySide2.QtDataVisualization.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 337, in _get_module_file_attribute loader = importlib.util.find_spec(package).loader File "E:\Program Files\Python3.9\lib\importlib\util.py", line 94, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 13096 INFO: Processing standard module hook 'hook-PySide2.QtGui.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 337, in _get_module_file_attribute loader = importlib.util.find_spec(package).loader File "E:\Program Files\Python3.9\lib\importlib\util.py", line 94, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 13798 INFO: Processing standard module hook 'hook-PySide2.QtWidgets.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 100, in <module> while run_next_command(read_fh, write_fh): File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command output = function(*args, **kwargs) File "E:\DEMO\python-demo\.venv\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 337, in _get_module_file_attribute loader = importlib.util.find_spec(package).loader File "E:\Program Files\Python3.9\lib\importlib\util.py", line 94, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 107, in <module> _setupQtDirectories() File "E:\DEMO\python-demo\.venv\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories import shiboken2 File "E:\DEMO\python-demo\.venv\lib\site-packages\shiboken2\__init__.py", line 27, in <module> from .shiboken2 import * 14131 INFO: Processing standard module hook 'hook-dateutil.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 14198 INFO: Processing pre-safe-import-module hook 'hook-six.moves.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 14331 INFO: Processing standard module hook 'hook-xml.dom.domreg.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' 14713 INFO: Processing standard module hook 'hook-PyQt5.py' from 'E:\\DEMO\\python-demo\\.venv\\lib\\site-packages\\PyInstaller\\hooks' ERROR: Aborting build process due to attempt to collect multiple Qt bindings packages: attempting to run hook for 'PyQt5', while hook for 'PySide2' has already been run! PyInstaller does not support multiple Qt bindings packages in a frozen application - either ensure that the build environment has only one Qt bindings package installed, or exclude the extraneous bindings packages via the module exclusion mechanism (--exclude command-line option, or excludes list in the spec file). (packaging_env) PS E:\PyCharmObject\emailSingUp\SignUp> 打包后没有生成exe程序
09-06
(myenv) PS D:\PythonItem> pyinstaller -F -w -i icon.ico 午夜赛出战.py 67 INFO: PyInstaller: 6.17.0, contrib hooks: 2025.10 68 INFO: Python: 3.14.0 80 INFO: Platform: Windows-10-10.0.19045-SP0 80 INFO: Python environment: D:\PythonItem\.venv 81 INFO: wrote D:\PythonItem\午夜赛出战.spec 83 INFO: Module search paths (PYTHONPATH): ['D:\\PythonItem\\.venv\\Scripts\\pyinstaller.exe', 'D:\\PythonItem\\.venv\\Scripts\\python314.zip', 'D:\\Python\\DLLs', 'D:\\Python\\Lib', 'D:\\Python', 'D:\\PythonItem\\.venv', 'D:\\PythonItem\\.venv\\Lib\\site-packages', 'D:\\PythonItem'] 274 INFO: checking Analysis 274 INFO: Building Analysis because Analysis-00.toc is non existent 274 INFO: Looking for Python shared library... 275 INFO: Using Python shared library: D:\PythonItem\.venv\Scripts\python314.dll 275 INFO: Running Analysis Analysis-00.toc 275 INFO: Target bytecode optimization level: 0 275 INFO: Initializing module dependency graph... 276 INFO: Initializing module graph hook caches... 284 INFO: Analyzing modules for base_library.zip ... 1116 INFO: Processing standard module hook 'hook-encodings.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 1374 INFO: Processing standard module hook 'hook-pickle.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 1599 INFO: Processing standard module hook 'hook-difflib.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 1607 INFO: Processing standard module hook 'hook-heapq.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 3210 INFO: Caching module dependency graph... 3231 INFO: Analyzing D:\PythonItem\午夜赛出战.py 3243 INFO: Processing standard module hook 'hook-idlelib.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 3287 INFO: Processing pre-find-module-path hook 'hook-tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path' 3287 INFO: TclTkInfo: initializing cached Tcl/Tk info... 3516 INFO: Processing standard module hook 'hook-_tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 3777 INFO: Processing standard module hook 'hook-multiprocessing.util.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 3849 INFO: Processing standard module hook 'hook-xml.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 4022 INFO: Processing standard module hook 'hook-_ctypes.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 4364 INFO: Processing standard module hook 'hook-platform.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 4558 INFO: Processing standard module hook 'hook-sysconfig.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 4615 INFO: Processing standard module hook 'hook-setuptools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 4616 INFO: SetuptoolsInfo: initializing cached setuptools info... 6530 INFO: Processing pre-safe-import-module hook 'hook-distutils.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6552 INFO: Processing pre-safe-import-module hook 'hook-jaraco.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6553 INFO: Setuptools: 'jaraco' appears to be a full setuptools-vendored copy - creating alias to 'setuptools._vendor.jaraco'! 6559 INFO: Processing pre-safe-import-module hook 'hook-more_itertools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6559 INFO: Setuptools: 'more_itertools' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.more_itertools'! 6633 INFO: Processing pre-safe-import-module hook 'hook-typing_extensions.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6633 INFO: Setuptools: 'typing_extensions' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.typing_extensions'! 6752 INFO: Processing pre-safe-import-module hook 'hook-packaging.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6868 INFO: Processing standard module hook 'hook-setuptools._vendor.jaraco.text.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 6868 INFO: Processing pre-safe-import-module hook 'hook-importlib_resources.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6874 INFO: Processing pre-safe-import-module hook 'hook-backports.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6874 INFO: Setuptools: 'backports' appears to be a full setuptools-vendored copy - creating alias to 'setuptools._vendor.backports'! 6986 INFO: Processing pre-safe-import-module hook 'hook-importlib_metadata.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 6986 INFO: Setuptools: 'importlib_metadata' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.importlib_metadata'! 7007 INFO: Processing standard module hook 'hook-setuptools._vendor.importlib_metadata.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 7008 INFO: Processing pre-safe-import-module hook 'hook-zipp.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 7008 INFO: Setuptools: 'zipp' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.zipp'! 7161 INFO: Processing pre-safe-import-module hook 'hook-tomli.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 7162 INFO: Setuptools: 'tomli' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.tomli'! 7489 INFO: Processing pre-safe-import-module hook 'hook-wheel.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module' 7490 INFO: Setuptools: 'wheel' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.wheel'! 8397 INFO: Processing standard module hook 'hook-openpyxl.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks' 8450 INFO: Processing standard module hook 'hook-numpy.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 10050 INFO: Processing standard module hook 'hook-xml.etree.cElementTree.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 10279 INFO: Processing standard module hook 'hook-PIL.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 10355 INFO: Processing standard module hook 'hook-PIL.Image.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 10632 INFO: Processing standard module hook 'hook-PIL.ImageFilter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 11069 INFO: Processing module hooks (post-graph stage)... 11275 INFO: Processing standard module hook 'hook-PIL.SpiderImagePlugin.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 11548 INFO: Processing standard module hook 'hook-_tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks' 11558 INFO: Performing binary vs. data reclassification (969 entries) 11649 INFO: Looking for ctypes DLLs 11690 INFO: Analyzing run-time hooks ... 11694 INFO: Including run-time hook 'pyi_rth_inspect.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks' 11696 INFO: Including run-time hook 'pyi_rth_pkgutil.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks' 11697 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks' 11698 INFO: Including run-time hook 'pyi_rth_setuptools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks' 11699 INFO: Including run-time hook 'pyi_rth__tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks' 11720 INFO: Creating base_library.zip... 11731 INFO: Looking for dynamic libraries 12088 INFO: Extra DLL search directories (AddDllDirectory): ['D:\\PythonItem\\.venv\\Lib\\site-packages\\numpy.libs'] 12088 INFO: Extra DLL search directories (PATH): [] 12323 INFO: Warnings written to D:\PythonItem\build\午夜赛出战\warn-午夜赛出战.txt 12362 INFO: Graph cross-reference written to D:\PythonItem\build\午夜赛出战\xref-午夜赛出战.html 12383 INFO: checking PYZ 12383 INFO: Building PYZ because PYZ-00.toc is non existent 12383 INFO: Building PYZ (ZlibArchive) D:\PythonItem\build\午夜赛出战\PYZ-00.pyz 12699 INFO: Building PYZ (ZlibArchive) D:\PythonItem\build\午夜赛出战\PYZ-00.pyz completed successfully. 12714 INFO: checking PKG 12714 INFO: Building PKG because PKG-00.toc is non existent 12714 INFO: Building PKG (CArchive) 午夜赛出战.pkg 14785 INFO: Building PKG (CArchive) 午夜赛出战.pkg completed successfully. 14793 INFO: Bootloader D:\PythonItem\.venv\Lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe 14793 INFO: checking EXE 14793 INFO: Building EXE because EXE-00.toc is non existent 14793 INFO: Building EXE from EXE-00.toc 14794 INFO: Copying bootloader EXE to D:\PythonItem\dist\午夜赛出战.exe 14795 INFO: Copying icon to EXE Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "D:\PythonItem\.venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module> sys.exit(_console_script_run()) ~~~~~~~~~~~~~~~~~~~^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 231, in _console_script_run run() ~~~^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 215, in run run_build(pyi_config, spec_file, **vars(args)) ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 70, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1272, in main build(specfile, distpath, workpath, clean_build) ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1210, in build exec(code, spec_namespace) ~~~~^^^^^^^^^^^^^^^^^^^^^^ File "D:\PythonItem\午夜赛出战.spec", line 19, in <module> exe = EXE( pyz, ...<17 lines>... icon=['icon.ico'], ) File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 675, in __init__ self.__postinit__() ~~~~~~~~~~~~~~~~~^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__ self.assemble() ~~~~~~~~~~~~~^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 788, in assemble self._retry_operation(icon.CopyIcons, build_name, self.icon) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 1058, in _retry_operation return func(*args) File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\utils\win32\icon.py", line 206, in CopyIcons srcpath = normalize_icon_type(srcpath, ("exe", "ico"), "ico", config.CONF["workpath"]) File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\icon.py", line 34, in normalize_icon_type raise FileNotFoundError(f"Icon input file {icon_path} not found") FileNotFoundError: Icon input file D:\PythonItem\icon.ico not found什么问题
最新发布
11-26
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值