开发中需要对python编写的程序举行打包,天生exe文件以便未安装python以及库依赖的用户举行使用。由于开发环境中的库文件庞大冗余,打包时导致文件很大,遂思量在虚拟环境中举行打包。
解决方案:conda + pyinstaller
历程:
conda create –name work_space python=3.6
conda activate
conda install packages
conda install pyinstaller == pip install pyinstaller
pyinstaller -Fw C:\User\Documents\pyinstall\ocr.py # 打包完成
conda deactivate #关闭虚拟环境
conda delete -n work_space –all #删除一个已有环境
conda env list
conda list #查看环境列表以及包列表
原文链接:https://www.cnblogs.com/vilogy/p/12330944.html
本站声明:网站内容来源于网络,若有侵权,请联系我们,我们将及时处理。
[转]Powershell中禁止执行脚本解决办法