import sysimport ospath1=sys.executablepath2=os.path.dirname(path1)print(path2)apt 文件生成exe命令pyinstaller -F 测试用.py
转自:https://blog.csdn.net/qq_43214142/article/details/109095457