Python 3.x 如何在Pyinstaller中添加模块?
目前,我正在使用python开发姿势估计程序。(我用了alphapose。) 我想在Windows 10中将此python项目设置为.exe文件。Python 3.x 如何在Pyinstaller中添加模块?,python-3.x,pyinstaller,pose-estimation,Python 3.x,Pyinstaller,Pose Estimation,目前,我正在使用python开发姿势估计程序。(我用了alphapose。) 我想在Windows 10中将此python项目设置为.exe文件。 我尝试使用pyinstaller(Pyinstaller版本:4.0) 生成exe文件时,我使用了此命令。 pyinstaller-F scripts/demo_interference.exe Pyinstalller完美地制作了exe文件。(Pyinstaller说信息:从EXE-00.toc构建EXE成功完成。) 但是,当我使用参数执行此文件时
我尝试使用pyinstaller(Pyinstaller版本:4.0) 生成exe文件时,我使用了此命令。
pyinstaller-F scripts/demo_interference.exe
Pyinstalller完美地制作了exe文件。(Pyinstaller说信息:从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)