首页 > 编程语言 > 详细

python:使用PyInstaller打包成exe文件,以及TypeError: an integer is required (got type bytes)异常解决

时间:2020-01-06 11:15:06      阅读:1354      评论:0      收藏:0      [点我收藏+]

用python3.6以上使用pyinstaller打包会出现 TypeError: an integer is required (got type bytes)异常, 解决办法如下:

1. 安装pyinstaller

pip install PyInstaller

技术分享图片

 

2. 打包单个文件

PyInstaller -F xxx.py

3. 出现异常 TypeError: an integer is requried(got type bytes)

原因:pyinstaller版本问题

解决方案:命令行输入如下命令卸载之前版本pyinstaller,更新为最新版本

Tips: 出现异常请更新pip:python -m pip install --upgrade pip

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

技术分享图片

 

 

4.再次执行打包命令:

pyinstaller -F 123.py

技术分享图片

 

打包成功! 

python:使用PyInstaller打包成exe文件,以及TypeError: an integer is required (got type bytes)异常解决

原文:https://www.cnblogs.com/phplzx/p/12155167.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!