如何解决如何在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 举报,一经查实,本站将立刻删除。