easyocr下載好幾次不成功的解決方案
easyocr下載好幾次不成功
當想運用ocr的時候首先現(xiàn)在控制臺輸入然后回車
pip install easyocr

當出現(xiàn)下圖說明下載成功

然后咱們需驗證一下看看能不能使用
接著新建項目然后輸入以下代碼
import easyocr
# 初始化 EasyOCR
reader = easyocr.Reader(['ch_sim']) # 指定語言,例如簡體中文和英文
# 測試代碼
print("EasyOCR 初始化成功!")發(fā)現(xiàn)報錯查詢說什么
在 PyCharm 的 Anaconda 虛擬環(huán)境中遇到 OMP: Error #15 錯誤時,問題通常是由多個庫(例如 Intel MKL 或其他依賴 OpenMP 的庫)沖突導致的。
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/ .
如果遇到這個問題
那么就可以采用下述方法:

在環(huán)境變量中添加以下一列如圖所示
KMP_DUPLICATE_LIB_OK=TRUE

然后再運行之前的代碼就可以驗證可以使用了

import easyocr
# 初始化 EasyOCR
reader = easyocr.Reader(['ch_sim']) # 指定語言,例如簡體中文和英文
# 測試代碼
print("EasyOCR 初始化成功!")總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
使用Python創(chuàng)建帶邊框樣式的Word表格的代碼實現(xiàn)
在生成Word文檔時,表格的邊框樣式是提升專業(yè)度的重要細節(jié)本文將通過一個實例,展示如何使用python-docx庫為表格添加上下邊框加粗和內(nèi)部邊框隱藏的復(fù)雜樣式,感興趣的小伙伴跟著小編一起來看看吧2025-04-04

