艹,每次打包都头痛的很
这次写了个基于Flask的服务,然后打包成exe
第一次打包:
打包过程一直出现一堆数组,等了半小时也没打出来
打二次打包:
用conda重新建了一个虚拟环境,将所用的包重新install一下,
这次没出现一堆数字,但是报错:“failed to execute pyi_rth_pkgres”
第三次打包:
上网找了这篇文章:python解决“failed to execute pyi_rth_pkgres”问题_半途行走的博客-CSDN博客_pyi_rth_pkgres
重新安装了pyinstall,但还是报错,后来我改一下打包的命令,改为:
pyinstaller -F Server.py -c
就没在报错了。一开始用的打包命令如下,就报错“failed to execute pyi_rth_pkgres”
pyinstaller -D Server.py -c
也不知道为啥
1.重新装了个conda虚拟环境
2.先卸载pyinstaller然后在从GitHub上下载安装
- pip uninstall pyinstaller
- pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
3.使用如下命令打包:
pyinstaller -F Server.py -c