How to make execute file from PyTorch? (PyTorch, PyQt, Pyinstaller)

hi, guys
I wanna make a execute file from my project. My project is consist of PyTorch, PyQt.
So I tried to use pyinstaller. I saw the some warning messages.

Warning messages are below. It can be easily fixed.(I installed PGI compiler)

37453 WARNING: lib not found: pgf90.dll
37541 WARNING: lib not found: pgc14.dll
37639 WARNING: lib not found: pgf90rtl.dll
38158 WARNING: lib not found: ATen.dll
38242 WARNING: lib not found: shm.dll
38340 WARNING: lib not found: nvToolsExt64_1.dll

But I could not make a execute file, which is due to this error message.

FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\xxx\AppData\Local\Temp\_MEI191242\torch\_thnn\…\lib\THNN.h’

I would like to finally create an executable using PyTorch and PyQt.

I have made execute file from PyTorch,but when I double-click execute file, it can run. It shows failed to execute script. Have you met this problem?

1 Like

Yes, It is the same problem you have experienced. Did you solve the problem?

No. I still haven’t solved this problem. I tried so many times, but failed. At last, I tried a simple example, the py file only consist of three lines of code:
import torch
a = torch.zeros(2, 3)

After I used this simple py file to create an executable, when I double-click execute file, it couldn’t run. It still showed “failed to execute script”. Could you tell me you how to solve it?