Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pyinstaller can't find a module? (error loading Python DLL)

I compiled my program with pyinstaller, and it works fine on my computer, but whenever I ty to run it in another computer (with no python), I get the following error:

Error loading Python DLL  
'C:\Users\perez\AppData\Local\Temp\_MEI28162\python310.dll'.
LoadLibrary: Cannot find specified module

What can I do? I'm not allowed to install python on the other computer

like image 687
FerdinandoPH Avatar asked Nov 15 '25 03:11

FerdinandoPH


2 Answers

I had the same problem and it was because I was using the output in build/main instead of dist/main (dist/main.exe in case you used --onefile)

like image 81
Neuron Avatar answered Nov 17 '25 19:11

Neuron


Ok, it was not working because I compiled the script with pyinstaller having python 3.10, but Windows 7's maximum python version is 3.8

like image 36
FerdinandoPH Avatar answered Nov 17 '25 19:11

FerdinandoPH