python 解决pyinstaller打包后获取当前路径失败 用户795291259869 2022-06-15 640 阅读1分钟 if getattr(sys, 'frozen', False): path = os.path.dirname(sys.executable) elif __file__: path = os.path.dirname(__file__)