Python, convert py file as .exe via pyinstaller

python -m pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple/

 

//PythonTest6.py
import
datetime import uuid import time import numpy as np def get_uuid_time(): return f"{uuid.uuid4().hex}_{datetime.datetime.now().strftime("%Y%m%d%H%M%S%f")}" num=0 if __name__=="__main__": while num<np.iinfo(int).max: num=num+1 print(f'{num},{get_uuid_time()}') time.sleep(1)

 

//cmd
pyinstaller --onefile PythonTest6.py

 

image

 

 

image

 

 

image

 

 

image

 

 

 

image

 

posted @ 2025-11-20 22:16  FredGrit  阅读(0)  评论(0)    收藏  举报