如何在Pyinstaller中添加模块?

问题描述

当前,我正在使用python开发姿势估计程序。 (我使用alphapose。) 我想将此python项目制作为Windows 10中的.exe文件
我尝试使用pyinstaller。 (Pyinstaller版本:4.0)

制作exe文件时,我使用了此命令。
pyinstaller -F scripts/demo_inference.exe

Pyinstalller使exe文件完美。 (Pyinstaller说INFO:从EXE-00.toc构建EXE成功完成。) 但是,当我使用参数执行此文件时,它无法执行脚本。
错误消息是这样的:

[16036] WARNING: file already exists but should not: C:\Users\MJ\AppData\Local\Temp_MEI160362\torch_C.cp37-win_amd64.pyd
Traceback (most recent call last):
File "demo_inference.py",line 9,in
File "c:\users\mj\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",line 493,in exec_module
exec(bytecode,module.dict)
File "torch_init_.py",line 81,in
ImportError: DLL load Failed: can't find module
[6980] Failed to execute script demo_inference

我不知道如何解决这个问题 (我认为问题是pyinstaller找不到pytorch) 我该如何解决这个问题?
(Pytorch版本:1.2.0)
(Python版本:3.7.9)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)