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文件的絕對路徑)
可能出現(xiàn)
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、程序會生成一個(gè)dist文件夾,里面是labelme的可執(zhí)行文件,可直接雙擊打開labelme

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容