我创建了一个hello.py,它将打印hello world 10次,每次延迟1秒。
import time
for i in range(0,10):
print("hello")
time.sleep(1)
现在,当我使用cx_Freeze方法将其转换为exe时,会创建hello.exe并且它未运行。我正在Windows 7 64位PC上运行它。
答案 0 :(得分:0)
You can check out pyinstaller. It takes python code and converts it into an executable. It might be overkill for what you're doing but it's worth a shot if the method you're currently using doesn't work. Check out the options you can run it with to make it a standalone executable.
答案 1 :(得分:0)