easyocr下载好几次不成功的解决方案
作者:jinqipiaopiao
easyocr下载好几次不成功
当想运用ocr的时候首先现在控制台输入然后回车
pip install easyocr

当出现下图说明下载成功

然后咱们需验证一下看看能不能使用
接着新建项目然后输入以下代码
import easyocr
# 初始化 EasyOCR
reader = easyocr.Reader(['ch_sim']) # 指定语言,例如简体中文和英文
# 测试代码
print("EasyOCR 初始化成功!")发现报错查询说什么
在 PyCharm 的 Anaconda 虚拟环境中遇到 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/ .
如果遇到这个问题
那么就可以采用下述方法:

在环境变量中添加以下一列如图所示
KMP_DUPLICATE_LIB_OK=TRUE

然后再运行之前的代码就可以验证可以使用了

import easyocr
# 初始化 EasyOCR
reader = easyocr.Reader(['ch_sim']) # 指定语言,例如简体中文和英文
# 测试代码
print("EasyOCR 初始化成功!")总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
