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

Question:

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:UsersperezAppDataLocalTemp_MEI28162python310.dll'.
    LoadLibrary: Cannot find specified module

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

Answers:

Copy the folder where your Python.exe is located and run this Python.exe

Answered By: Devyl

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

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)

Answered By: Neuron
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.