PyInstaller-Perfect-Build-Method icon indicating copy to clipboard operation
PyInstaller-Perfect-Build-Method copied to clipboard

如果我要写一个 Python 项目,打包成 exe 运行(方便在没有 Python 的电脑上使用),我需要打包出的根目录结构美观,没有多余的、杂乱的依赖文件在那里碍眼,而且需要在发现 bug 时,我还需要能够修改里面的代码后,...

Results 6 PyInstaller-Perfect-Build-Method issues
Sort by recently updated
recently updated
newest added

![image](https://github.com/HaujetZhao/PyInstaller-Perfect-Build-Method/assets/18425195/a4d48b39-5e4d-44ea-8758-503b8f47a999) # 1. 整体思路(start_tcp_server_19099.py 是主启动文件) ``` cd E:\gitee-procjet\iot-automatic-pet-feeding\python\wxhelper\py\release 1. 进入项目目录,执行 pyi-makespec .\start_tcp_server_19099.py - 此处会生成 spec 文件,我们后续将进行修改 - 【注意】不要加 -F,表示所有依赖都将拷贝到 dist 目录下 2. 参考我的 start_tcp_server_19099.spec 文件 1. 设置 exe 程序名称 2....

下面以gooey模块举例: 用于命令行UI可视化的gooey模块,该模块内部代码使用的sys._MEIPASS还默认根目录作为模块存放目录来工作,所以此种模块还需要整体不移动位置,同时该模块不能添加到excludes里面,否则会分析时漏掉一些py文件,导致软件不能正常运转。 我已经按照你的思路完善了一下解决了这个问题,但是不知道该怎么提交。

Traceback (most recent call last): File "Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32comgenpy.py", line 40, in File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "win32com\__init__.py", line 8, in File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "pythoncom.py", line...

我在`hello_main.py`文件中导入了`pandas`,然后进行打包,报错如下: ``` Traceback (most recent call last): File "hello.py", line 3, in File "E:\hello\hello_main.py", line 4, in import pandas as pd File "E:\hello\libs\pandas\__init__.py", line 16, in raise ImportError( ImportError: Unable...

我自定义了一个ToolKits在下,在入口文件中,我使用 import os import sys sys.path.insert('D:\python\ToolKits') 然后再导入ToolKits下的模块 from ToolKits.GeneralObject import Date 然后使用Date Date('ss') 这种情况下,我该如何设置spec文件啊