前言 昨天写了一个搜索城市获得近三十天 的一个小程序,打包后弹出Failed to execut script Weather(PS:我的文件名称为Weather.py)一下子给我干蒙了。 我用的是pyinstaller进行打包的 pyinstaller -F -w Weather.py 结果一运行就报错。后来百度了好多解决办法。终于让我找到了。只要把-w取消了就行 pyinstaller -F Weather.py 这样就可以完美运行了。