Missing .dll when running pyinstaller .exe file on another computer
<p>I have been busy making a short script in python to get users HWID. Because computers without python installed can't run the script, I have converted it to an .exe file using pyinstaller.</p>

<p>However, when I tried running the .exe file on my laptop (running windows 7 ultimate and does not have python installed) it gives the error message: </p>

<pre><code>The procedure entry point ucrtbase.terminate could not be located in the dynamic link library api-ms-win-crt-runtime-l1-1-0.dll.
</code></pre>

<p>Here is how I converted to .exe, just in-case i'm doing it wrong. </p>

<p>Code:</p>

<pre><code>import subprocess
import hashlib
import time
def addToClipBoard(text):
    command = 'echo ' + text.strip() + '| clip'
    os.system(command)
x = subprocess.check_output('wmic csproduct get UUID') #gets UUID from pc
x = x[42:] # removes unnecessary parts of string
x = x[:-9] # removes unnecessary parts of string
hash_object = hashlib.sha512(x) # Converts to sha512 hash
hex_dig = hash_object.hexdigest() # Converts hash to hex-decimal string
os.system("title HWID tool")
os.system("color 4e")
print("Your protected hardware ID is")
print(hex_dig)
time.sleep(3)
print("This has been automatically saved to your clipboard.") 
addToClipBoard(hex_dig) #saves hex decimal string to clipboard.
</code></pre>

<p>Than I go into CMD, make sure im in the correct directory and run this. </p>

<pre><code>pyinstaller.exe --onefile compile.py
</code></pre>

<p>NOTE: I only get the error when running the .exe file on my laptop. I do not get the error when running on the computer I converted it to an .exe on. </p>

<p>Both the computer I compiled it on, and the laptop are 64bit, windows 7 ultimate machines. </p>

<p>EDIT: Works on my friends computer, however he has python installed. </p>

<p>Can you please tell me why I am getting this error and how to fix it?</p>

<p>The issue is a missing <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145" rel="nofollow">Visual C++ 2015 Redistributable</a> as @eryksun alluded to.  However it was published July 10, 2015 so I don't know that it's necessarily an update issue as well.</p>

<p>I had the same problem on a recently installed &amp; updated Windows 7 Professional x64 computer where the compiled .exe did not work (with the <code>api-ms-win-crt-runtime-l1-1-0.dll</code> error) prior to installing the redistributable and then did after installing it.</p>

python windows python-3.x compilation pyinstaller