【python013】pyinstaller打包PDF提取脚本为exe工具

news2024/7/4 5:18:02

1.在日常工作和学习中,遇到类似问题处理场景,如pdf文件核心内容截取,这里将文件打包成exe可执行文件,实现功能简便使用。
2.欢迎点赞、关注、批评、指正,互三走起来,小手动起来!
3.欢迎点赞、关注、批评、指正,互三走起来,小手动起来!

  • 脚本代码请参考下文章(上一篇结果代码),也可以到文末。
    • 【python012】Python根据页码处理PDF文件的内容
    • 【python012】Python根据页码处理PDF文件的内容

文章目录

    • 1.环境准备
    • 2.`pyinstaller`打包输出脚本工具
    • 3.参数及生成文件释义
    • 4.打包错误示例及工具代码

1.环境准备

  • 历史安装的环境打包失败,或环境包不兼容,或历史安装包太多等问题,新建环境可能会更快些。问题如4小节记录。
    # 在 Anaconda Prompt 环境中创建虚拟环境
    conda create -n youli python==3.8.0
    
    # 激活新建的虚拟环境
    conda activate youli
    
    # 安装必要的Python环境包
    pip install fitz
    pip install pymupdf
    pip install wxpython
    pip install pyinstaller
    pip install frontend wxpython
    
    # 删除虚拟环境
    # conda create -n youli python==3.8.0
    
    # 查看当前存在哪些虚拟环境
    # conda env list 
    # conda info -e
    
  • 虚拟环境效果如下:
    在这里插入图片描述
  • 环境包版本详情如下:
    在这里插入图片描述

2.pyinstaller打包输出脚本工具

  • 命令行
    pyinstaller -F -w ..\pdfextract.py --noconfirm --noconsole -p ..\Anaconda3\envs\python8\Lib\site-packages
    
  • 执行结果详情
    (python8) C:\Users\Administrator>pyinstaller -F -w ..\pdfextract2.py --noconfirm --noconsole -p ..\Anaconda3\envs\python8\Lib\site-packages
    420 INFO: PyInstaller: 6.8.0, contrib hooks: 2024.7
    420 INFO: Python: 3.8.0 (conda)
    421 INFO: Platform: Windows-10-10.0.19041-SP0
    422 INFO: Python environment: ..\Anaconda3\envs\python8
    423 INFO: wrote C:\Users\Administrator\pdfextract2.spec
    429 DEPRECATION: Foreign Python environment's site-packages paths added to --paths/pathex:
    ['..\\Anaconda3\\envs\\python8\\Lib\\site-packages']
    This is ALWAYS the wrong thing to do. If your environment's site-packages is not in PyInstaller's module search path then you are running PyInstaller from a different environment to the one your packages are in. Run print(sys.prefix) without PyInstaller to get the environment you should be using then install and run PyInstaller from that environment instead of this one. This warning will become an error in PyInstaller 7.0.
    430 INFO: Module search paths (PYTHONPATH):
    ['..\\Anaconda3\\envs\\python8\\Scripts\\pyinstaller.exe',
     '..\\Anaconda3\\envs\\python8\\python38.zip',
     '..\\Anaconda3\\envs\\python8\\DLLs',
     '..\\Anaconda3\\envs\\python8\\lib',
     '..\\Anaconda3\\envs\\python8',
     '..\\Anaconda3\\envs\\python8\\lib\\site-packages',
     'E:\\PycharmSpace\\orclblobtest',
     '..\\Anaconda3\\envs\\python8\\Lib\\site-packages']
    733 INFO: checking Analysis
    733 INFO: Building Analysis because Analysis-00.toc is non existent
    733 INFO: Running Analysis Analysis-00.toc
    735 INFO: Target bytecode optimization level: 0
    735 INFO: Initializing module dependency graph...
    736 INFO: Caching module graph hooks...
    754 INFO: Analyzing base_library.zip ...
    1824 INFO: Loading module hook 'hook-heapq.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    1897 INFO: Loading module hook 'hook-encodings.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    3157 INFO: Loading module hook 'hook-pickle.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    3815 INFO: Caching module dependency graph...
    3965 INFO: Looking for Python shared library...
    3973 INFO: Using Python shared library: ..\Anaconda3\envs\python8\python38.dll
    3974 INFO: Analyzing E:\PycharmSpace\orclblobtest\pdfextract2.py
    5889 INFO: Loading module hook 'hook-PIL.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    5956 INFO: Loading module hook 'hook-PIL.Image.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    6952 INFO: Loading module hook 'hook-numpy.py' from '..\\Anaconda3\\envs\\python8\\Lib\\site-packages\\numpy\\_pyinstaller'...
    7029 WARNING: Conda distribution 'numpy', dependency of 'numpy', was not found. If you installed this distribution with pip then you may ignore this warning.
    7572 INFO: Loading module hook 'hook-multiprocessing.util.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    7681 INFO: Loading module hook 'hook-xml.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    8209 INFO: Loading module hook 'hook-difflib.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    8295 INFO: Loading module hook 'hook-platform.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    8669 INFO: Loading module hook 'hook-sysconfig.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    9621 INFO: Loading module hook 'hook-packaging.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    9745 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    10018 INFO: Loading module hook 'hook-pandas.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    11702 INFO: Loading module hook 'hook-pytz.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    12067 INFO: Loading module hook 'hook-pkg_resources.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    14388 INFO: Loading module hook 'hook-scipy.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    14539 INFO: Loading module hook 'hook-scipy.linalg.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    14909 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    15183 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    15243 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    16644 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    17421 INFO: Loading module hook 'hook-scipy.stats._stats.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    18308 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    20782 INFO: Loading module hook 'hook-pandas.plotting.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    21009 INFO: Processing pre-safe import module hook six.moves from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
    22334 INFO: Loading module hook 'hook-sqlite3.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    22879 INFO: Loading module hook 'hook-pandas.io.clipboard.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    23076 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    23078 INFO: Loading module hook 'hook-lxml.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
    23627 INFO: Loading module hook 'hook-lxml.etree.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
    23633 INFO: Loading module hook 'hook-xml.dom.domreg.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    24205 INFO: Processing module hooks...
    24282 INFO: Loading module hook 'hook-lxml.isoschematron.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
    24301 WARNING: Hidden import "jinja2" not found!
    24515 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    25007 INFO: Loading module hook 'hook-lxml.objectify.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
    25027 INFO: Performing binary vs. data reclassification (624 entries)
    25172 INFO: Looking for ctypes DLLs
    25217 INFO: Analyzing run-time hooks ...
    25225 INFO: Including run-time hook '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
    25229 INFO: Processing pre-find module path hook _pyi_rth_utils from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-_pyi_rth_utils.py'.
    25230 INFO: Loading module hook 'hook-_pyi_rth_utils.py' from '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks'...
    25231 INFO: Including run-time hook '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
    25234 INFO: Including run-time hook '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
    25237 INFO: Including run-time hook '..\\Anaconda3\\envs\\python8\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
    25287 INFO: Looking for dynamic libraries
    ..\Anaconda3\envs\python8\lib\site-packages\PyInstaller\building\build_main.py:205: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
      __import__(package)
    26904 INFO: Extra DLL search directories (AddDllDirectory): ['..\\Anaconda3\\envs\\python8\\lib\\site-packages\\numpy\\.libs']
    26904 INFO: Extra DLL search directories (PATH): []
    30079 INFO: Warnings written to C:\Users\Administrator\build\pdfextract2\warn-pdfextract2.txt
    30264 INFO: Graph cross-reference written to C:\Users\Administrator\build\pdfextract2\xref-pdfextract2.html
    30336 INFO: checking PYZ
    30337 INFO: Building PYZ because PYZ-00.toc is non existent
    30337 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\build\pdfextract2\PYZ-00.pyz
    32361 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\build\pdfextract2\PYZ-00.pyz completed successfully.
    32416 INFO: checking PKG
    32416 INFO: Building PKG because PKG-00.toc is non existent
    32417 INFO: Building PKG (CArchive) pdfextract2.pkg
    59038 INFO: Building PKG (CArchive) pdfextract2.pkg completed successfully.
    59060 INFO: Bootloader ..\Anaconda3\envs\python8\lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe
    59060 INFO: checking EXE
    59061 INFO: Building EXE because EXE-00.toc is non existent
    59061 INFO: Building EXE from EXE-00.toc
    59061 INFO: Copying bootloader EXE to C:\Users\Administrator\dist\pdfextract2.exe
    59067 INFO: Copying icon to EXE
    59072 INFO: Copying 0 resources to EXE
    59072 INFO: Embedding manifest in EXE
    59076 INFO: Appending PKG archive to EXE
    59148 INFO: Fixing EXE headers
    59664 INFO: Building EXE from EXE-00.toc completed successfully.
    

3.参数及生成文件释义

  • pyinstaller参数含义
    在这里插入图片描述
  • 输出文件内容含义
    • Analysis:主要是分析py文件的依赖信息
    • PYZ:是一个.pyz的压缩包,包含程序运行需要的依赖
    • EXE:是根据上述两项内容而生成的
    • COLLECT:主要是输出信息dist文件夹:最终的exe文件存放位置
    • build文件夹:中间过程,创建好之后可以直接删除
      • 整体详情如下图所示:
        在这里插入图片描述

4.打包错误示例及工具代码

  • 错误示例部分
    在这里插入图片描述
  • 打包代码
    # -*- coding: utf-8 -*-
    
    import fitz
    import wx
    
    class PDFExtractor(wx.Frame):
        def __init__(self, parent, _title):
            wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=_title, pos=wx.DefaultPosition,
                              size=wx.Size(500, 254), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL )
    
            self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
            self.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
            self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_ACTIVECAPTION))
    
            bSizer2 = wx.BoxSizer(wx.VERTICAL)
    
            self.m_filePicker2 = wx.FilePickerCtrl(self, wx.ID_ANY, wx.EmptyString, u"Select a file", u"*.*",
                                                   wx.DefaultPosition, wx.DefaultSize, wx.FLP_DEFAULT_STYLE)
            self.m_filePicker2.SetFont(wx.Font(9, 74, 90, 92, False, "微软雅黑"))
            self.m_filePicker2.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT))
            self.m_filePicker2.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT))
    
            bSizer2.Add(self.m_filePicker2, 0, wx.ALL | wx.EXPAND, 5)
    
            self.m_staticText5 = wx.StaticText(self, wx.ID_ANY, u"Start Page:", wx.DefaultPosition, wx.DefaultSize, 0)
            self.m_staticText5.Wrap(-1)
            self.m_staticText5.SetFont(wx.Font(9, 74, 90, 92, True, "微软雅黑"))
            self.m_staticText5.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
    
            bSizer2.Add(self.m_staticText5, 0, wx.ALL, 5)
    
            self.m_textCtrl1 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0)
            bSizer2.Add(self.m_textCtrl1, 0, wx.EXPAND, 5)
    
            self.m_staticText6 = wx.StaticText(self, wx.ID_ANY, u"End Page:", wx.DefaultPosition, wx.DefaultSize, 0)
            self.m_staticText6.Wrap(-1)
            self.m_staticText6.SetFont(wx.Font(9, 74, 90, 92, True, "微软雅黑"))
            self.m_staticText6.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
    
            bSizer2.Add(self.m_staticText6, 0, wx.ALL, 5)
    
            self.m_textCtrl2 = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0)
            bSizer2.Add(self.m_textCtrl2, 0, wx.EXPAND, 5)
    
            self.m_button18 = wx.Button(self, wx.ID_ANY, u"Extract", wx.DefaultPosition, wx.DefaultSize, wx.NO_BORDER)
            self.m_button18.SetFont(wx.Font(12, 74, 90, 92, False, "微软雅黑"))
            self.m_button18.SetForegroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNTEXT))
            self.m_button18.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNHIGHLIGHT))
    
    
            self.m_button18.Bind(wx.EVT_BUTTON, self.extract_pages)
    
            bSizer2.Add(self.m_button18, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.SHAPED, 5)
    
            self.SetSizer(bSizer2)
            self.Layout()
            self.Centre(wx.BOTH)
        def __del__(self):
            pass
    
        def extract_pages(self, event):
            file_path = self.m_filePicker2.GetPath()
            start_page = int(self.m_textCtrl1.GetValue())
            end_page = int(self.m_textCtrl2.GetValue())
    
            doc = fitz.open(file_path)
            output_doc = fitz.open()
    
            for page_num in range(start_page - 1, end_page):
                output_doc.insert_pdf(doc, from_page=page_num, to_page=page_num)
    
            output_path = file_path.replace(".pdf", "_extracted.pdf")
            output_doc.save(output_path)
            output_doc.close()
            doc.close()
    
            wx.MessageBox("Extraction complete!", "Success", wx.OK | wx.ICON_INFORMATION)
    
    # app = wx.App()
    # PDFExtractor(None, title="PDF Extractor")
    # app.MainLoop()
    
    if __name__ == '__main__':
        app = wx.App()  # 运行wx.App()方法
        title = "PDF Extractor"
        frame = PDFExtractor( None , title )  # 调用Frame类,并且不指定父类,当前就成为父类
        frame.Show()  # 运行展示界面的方法Show()
        app.MainLoop()  # 进入程序wx.App()循环
    
    

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1863679.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

视频文件太大怎么压缩?十大视频压缩软件可解决您的问题

您是否已经受够了无法上传视频文件,因为它们太大了?如果您正在积极寻找免费下载的视频压缩软件,下面概述了目前在线提供的 10 个功能更强大的软件。 我们建议您在决定下载之前先通读一下这个简短的介绍。我们不希望您随意点击一个选项&#…

STM32定时器篇——通用定时器的使用(定时中断,PWM输出)

一、通用定时器的类型以及应用功能: 通用定时器有:TIM2、TIM3、TIM4、TIM5,其总线挂载于APB1上,且有基本定时器的所有功能(定时中断、主模式触发ADC),并额外具有内外时钟源选择,输入…

学习笔记——动态路由——RIP(Rip 基本配置)

五、Rip 基本配置 主类网络(有类,major-net): 使用自然掩码的网段 例如: 12.1.1.0/24--->12.0.0.0 192.168.1.0/24--->192.168.1.0 172.16.1.0/24--->172.16.0.0 基本配置: 济南总局: IP:192.168.1.1 /…

如何提高pcdn技术的传输效率?

提高PCDN技术的传输效率是一个复杂且多层面的任务,涉及多个关键策略和方法的结合。以下是一些具体的建议和措施,有助于提升PCDN技术的传输效率: 一.优化缓存策略: 精准定位热点内容,优先将这部分内容缓存…

Python-批量日期数据格式化处理

背景 用于批量格式化数据,背景就是领导给我我一张下面这样的表格,其中启用日期是五花八门的格式,大概有几万行,需要把启用日期一列统一格式化为“YYYY-MM-DD”的格式,显然,针对这种格式不统一的数据&#…

GPT-4搞不定的图推理,港科大7B模型搞定

大模型执行图推理任务,我们是希望大模型仅仅给出结果,还是在给出准确答案的同时,输出详细的推理过程? 先来看GPT-4的表现: 给出了一个非常简短且错误的答案(判断该图中没有环),这可…

【扩散模型(二)】IP-Adapter 从条件分支的视角,快速理解相关的可控生成研究

系列文章目录 【扩散模型(一)】中介绍了 Stable Diffusion 可以被理解为重建分支(reconstruction branch)和条件分支(condition branch)本文将从该视角快速理解 IP-Adapter 以及相关可控生成研究。 文章目…

linux下OpenSSL升级到1.1以上版本

要将CentOS 7上的OpenSSL升级到1.1以上版本,您需要遵循以下步骤。请注意,这些步骤可能需要一些系统管理经验,因为您将从源代码编译和安装OpenSSL。 1. 更新系统软件包 首先,确保您的系统软件包是最新的。使用以下命令更新所有软…

智慧校园-毕业管理系统总体概述

在当今教育信息化的浪潮中,智慧校园毕业管理系统脱颖而出,它作为一项综合性的数字平台,全面覆盖了从毕业资格审查到学位授予的每一个关键步骤,旨在通过智能化手段,为高校的毕业管理工作带来革命性的变革。毕业管理系统…

下一代广域网技术2:SRv6

2.SRv6 SR架构设计之初,就为SR数据平面设计了两种实现方式:一种是SR-MPLS,其重用了MPLS数据平面,可以在现有IP/MPLS网络上增量部署;另一种是SRv6,使用IPv6数据平面,基于IPv6路由扩展头进行扩展…

第七届IAIC(成都)国际医美产业大会在蓉召开

四川省人民医院新丽美获“中国整形美容协会医疗救助与修复基金-成都市整形修复定点医院”“‘放心美 医无忧’全过程保障示范医院”两块授牌 2024年6月24日,第七届IAIC(成都)国际医美产业大会暨“医美之都”高峰会议省医院新丽美整形修复基地…

CesiumJS加载天地图数据后,可以实现什么效果?

说起地图,大家耳熟能详的百度地图、高德地图、腾讯地图等,由于授权的原因,使用起来心惊胆战的,而天地图就没有这方面的困扰,本文介绍下如何在cesium中时候用天地图数据,已经能够实现哪些交互效果。 一、关…

无限制数字(仅仅int类型)的大小的自然排序算法

直接上代码&#xff1a; #include <iostream> #include <vector> #include <string> #include <algorithm> #include <cctype>// Function to compare two strings in a natural way bool naturalCompare(const std::string& a, const std:…

录制视频怎么操作?手把手教会你!

在这个互联网科技高速发展的时代&#xff0c;录制视频已经成为了人们生活中一个不可或缺的技能。无论是记录游戏精彩瞬间、制作教程、分享生活趣事&#xff0c;还是进行在线教学&#xff0c;录制视频都是一种非常直观有效的方式。可是录制视频怎么操作呢&#xff1f;本文将介绍…

Vue组件生命周期深度剖析:从创建到销毁的八大钩子实战指南

系列文章目录 Vue核心指令解析&#xff1a;探索MVVM与数据操作之美 文章目录 系列文章目录前言一、Vue生命周期是什么&#xff1f;二、钩子函数讲解1. beforeCreate( 创建前 )2. created ( 创建后 &#xff09;3. beforeMount&#xff08;挂载前&#xff09;4. mounted&#xf…

第11章 规划过程组(制订项目管理计划)

第11章 规划过程组&#xff08;一&#xff09;11.1制订项目管理计划&#xff0c;在第三本版教材第368~372页&#xff1b; 文字图片音频方式 视频16 第一个知识点&#xff1a;主要输入 1、事业环境因素 政府或行业标准(如产品标准、质量标准、安全标准和工艺标准) 法律法规要求…

乐乐趣《牛津话科学 侃侃闪闪的科学大冒险》新书分享会圆满落幕

2024年6月21日&#xff0c;乐乐趣《牛津话科学 侃侃闪闪的科学大冒险》新书分享会在BIBF绘本展活动区举行。牛津大学出版社中国区首席内容官孙赫男、北京师范大学教育学部副教授张进宝、中国美协漫画艺术委员会秘书长王立军、荣信文化副总经理兼乐乐趣总编辑孙肇志围绕孩子的科…

【Python机器学习】聚类算法的对比与评估——在人脸数据集上比较算法

数据探查&#xff1a; 我们将k均值、DBSCAN和凝聚聚类算法应用于Wild数据集中的Labeled Faces&#xff0c;并查看它们是否找到了有趣的结构。我们将使用数据的特征脸表示&#xff0c;它由包含100个成分的PCA(whitenTrue)生成&#xff1a; peoplefetch_lfw_people(data_home &…

ChatGPT API技术教程OpenAI APIKey在线对接-Chat Completion对象

表示模型根据提供的输入返回的聊天完成响应。 {"id": "chatcmpl-123","object": "chat.completion","created": 1677652288,"model": "gpt-3.5-turbo-0125","system_fingerprint": "fp…

锂价跌至近3年最低,大型能源公司已出手抄底,巴菲特也在参与

长远来看&#xff0c;随着电动化进程的深入推进&#xff0c;锂的战略地位依然不可替代。但短期内&#xff0c;供需失衡和价格波动可能会持续&#xff0c;行业参与者需要调整策略以应对当前的挑战。 锂业&#xff0c;正经历自2021年以来最为严峻的调整期。作为电动汽车电池的关…