labelme 打包

打包labelme为exe文件,简化操作,在没有安装python和anocanda的情况下也能适用

1、下载labelme源码
https://github.com/wkentaro/labelme/releases

2、安装pyinstaller
pip install pyinstaller

3、解压labelme源码,找到labelme.spec文件

4、pyinsalller -F (labelme.spec文件的绝对路径)
建议先pyinstaller -F labelme/main.py ,将缺少的包先装上,再pyinsalller -F (labelme.spec文件的绝对路径)
可能出现
1)RecursionError: maximum recursion depth exceeded while calling a Python object
则在labelme.spec中
第三行加入
import sys
sys.setrecursionlimit(1000000)
2)UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 110: invalid continuation byte
则修改anocanda 中site-packages\PyInstaller\compat.py
out = out.decode(encoding)
改成
out = out.decode(encoding, errors='ignore')

5、程序会生成一个dist文件夹,里面是labelme的可执行文件,可直接双击打开labelme

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容