Open acl98 opened 1 month ago
Hi,开发者朋友,鉴于您是首次在QPT下新增Issue,请务必参考给定的Issue模板进行Issue的新增。 虽然形如版本号、打包日志等信息可能对你并不重要,但如未提供则可能会严重拖慢Issue的解决效率,因为他们对于QPT的维护者而言非常重要! 如您未按Issue模板进行内容补充,可关闭此Issue或Edit该Issue,社区维护者会对低效Issue直接Close,请悉知!
首次运行时的初始化,是通过命令行让系统自动安装一遍系统所需的Python环境吗?
GT @.***
------------------ 原始邮件 ------------------ 发件人: "QPT-Family/QPT" @.>; 发送时间: 2024年7月8日(星期一) 下午4:21 @.>; @.**@.>; 主题: Re: [QPT-Family/QPT] 打包完成后运行DeBug.exe控制台报错 (Issue #109)
首次运行时的初始化,是通过命令行让系统自动安装一遍系统所需的Python环境吗?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.Message ID: @.***>
更换路径依然是这样的报错,我注意到每个找不到的包报错会给出一个路径 "...\Debug\opt/packages"
Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement paddleocr==2.8.0 (from versions: none) ERROR: No matching distribution found for paddleocr==2.8.0
这个路径应该是在执行打包脚本时创建的,我发现在opt文件夹下并没有packages这个文件
下面是我的打包脚本代码
from qpt.executor import CreateExecutableModule as CEM
module = CEM(work_dir="./", # [项目文件夹]待打包的目录,并且该目录下需要有↓下方提到的py文件 launcher_py_path="main.py", # [主程序文件]用户启动EXE文件后,QPT要执行的py文件 save_path="./exe", # [输出目录]打包后相关文件的输出目录 requirements_file="auto") # [Python依赖]此处可填入依赖文件路径,也可设置为auto自动搜索依赖
module.make()
后来我把paddleocr源码下载下来使用源码进行封装,运行时依然报错,我仔细查看了错误提示,都是在初始化时报错找不到某个包,类似于我们在pip时提示的找不到对应版本。那么对于打包来说,他并不会从某个网址pip 而是在我们打包时将所有的包整合在 “输出目录/DeBug/opt/packages" 的这个目录。所以初始化时会按照opt文件夹下的requirements_dev.txt内需要安装的包进行pip安装,但是在我这里打包完成后opt文件夹中并没有packages这个文件夹,所以会报错找不到对应版本。
以上是我的猜想,但是我却不明白为什么会出现这种情况,请各位大佬帮忙解惑
QPT版本
1.0b5
操作系统版本
Windows 10
核心信息填写
复现步骤/报错截图
步骤描述
(可描述您参考了哪些文档中的步骤,或自己在做哪些操作时遇到了问题,社区维护者可以通过该描述来尽可能复现您的情况)
【如报错则必须提供】Requirements文件内容
【如报错则必须提供】完整打包日志
完整运行日志(如打包时已报错,此处可选)
初始化进度-08 164/6 |━━━━━━━━━━━━━ | 66.67% AddPaddlePaddlePackage部署中...→[2024-07-08 16:03:52,118] [DEBUG] | 正在加载AddPaddlePaddlePackage-LocalInstallWhlOptOP →[2024-07-08 16:03:52,119] [DEBUG] | SHELL: D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install paddleocr==2.8.0 -U --upgrade-strategy eager --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index --no-deps -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary →[2024-07-08 16:03:52,120] [DEBUG] | PS D:> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install paddleocr==2.8.0 -U --upgrade-strategy eager --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index --no-deps -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? →[2024-07-08 16:03:52,847] [DEBUG] | Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages →[2024-07-08 16:03:52,859] [DEBUG] | WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. →[2024-07-08 16:03:52,861] [DEBUG] | ERROR: Could not find a version that satisfies the requirement paddleocr==2.8.0 (from versions: none) →[2024-07-08 16:03:52,861] [DEBUG] | ERROR: No matching distribution found for paddleocr==2.8.0 →[2024-07-08 16:03:52,917] [ERROR] | 在执行终端命令时检测到了失败,完整信息如下: PS D:> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install paddleocr==2.8.0 -U --upgrade-strategy eager --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index --no-deps -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement paddleocr==2.8.0 (from versions: none) ERROR: No matching distribution found for paddleocr==2.8.0
初始化进度-08 165/6 |━━━━━━━━━━━━━━━━ | 83.33% 初始化完毕→[2024-07-08 16:03:52,919] [INFO] | ----------WARNING SUMMARY →[2024-07-08 16:03:52,920] [INFO] | ----------ERROR SUMMARY →[2024-07-08 16:03:52,922] [INFO] | 0|在执行终端命令时检测到了失败,完整信息如下: PS D:\Desktop\py_ppocr\PPocr\exe\Debug\resources> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install -r C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\Cache\FileSerialize.tmp --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement wget (from versions: none) ERROR: No matching distribution found for wget
→[2024-07-08 16:03:52,923] [INFO] | 0|在执行终端命令时检测到了失败,完整信息如下: PS D:> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install paddlepaddle -U --upgrade-strategy eager --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement paddlepaddle (from versions: none) ERROR: No matching distribution found for paddlepaddle
→[2024-07-08 16:03:52,924] [INFO] | 0|在执行终端命令时检测到了失败,完整信息如下: PS D:> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install -r D:\Desktop\py_ppocr\PPocr\exe\Debug\opt\requirements_dev.txt --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index --no-deps -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement shapely==2.0.4 (from versions: none) ERROR: No matching distribution found for shapely==2.0.4
→[2024-07-08 16:03:52,925] [INFO] | 0|在执行终端命令时检测到了失败,完整信息如下: PS D:> cd D:\ ; D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe -m pip install paddleocr==2.8.0 -U --upgrade-strategy eager --target D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\Lib\site-packages --no-index --no-deps -f D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages --isolated --disable-pip-version-check --cache-dir C:\Users\cve\AppData\Local\Temp\QPT_Cache_V/1.0b7\pip_cache --timeout 10 --prefer-binary ; echo "---QPT OUTPUT STATUS CODE---" $? Looking in links: d:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages WARNING: Location 'D:\Desktop\py_ppocr\PPocr\exe\Debug\opt/packages' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement paddleocr==2.8.0 (from versions: none) ERROR: No matching distribution found for paddleocr==2.8.0
→[2024-07-08 16:03:52,927] [INFO] | ----------生成状态WARNING:0 ERROR:4 →[2024-07-08 16:03:56,461] [INFO] | 环境部署完毕! D:\Desktop\py_ppocr\PPocr\exe\Debug\Python\python.exe Traceback (most recent call last): File "main.py", line 7, in
from paddleocr import PaddleOCR
ModuleNotFoundError: No module named 'paddleocr'
其他信息