I was able to create an exe file using Pyinstaller.
However, when I run the exe file, I get the following error
Traceback (most recent call last):
File "MyApp.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "ifacialmocap_puppeteer.py", line 13, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "load_poser.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "torch\__init__.py", line 140, in <module>
raise err
OSError: [WinError 126] The specified module cannot be found. Error loading "C:\Users\username\Documents\hold\MyApp-main\dist\MyApp\torch\lib\shm.dll" or one of its dependencies.
I was able to create an exe file using Pyinstaller.
However, when I run the exe file, I get the following error
When I run the
"python MyApp.py"before making the exe file, there is no error and my app works.Is this due to the fact that I am using PyTorch?
[My environment]
Python version 3.8
Windows11
Anaconda Navigator 2.2.0
conda
Pyinstaller version 4.8