JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
23.72k stars 3.11k forks source link

Fail to run sample code due to OMP issues? #549

Closed kevintsq closed 2 years ago

kevintsq commented 2 years ago
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/.

Process finished with exit code 3

I set the environment variable KMP_DUPLICATE_LIB_OK=TRUE, reboot the system, but it also fails. Windows 10 20H2 19042.1237, Python 3.8.5, installed packages:

Package                            Version
---------------------------------- -----------------
absl-py                            0.13.0
addict                             2.4.0
aiohttp                            3.7.4.post0
alabaster                          0.7.12
altgraph                           0.17
anaconda-client                    1.8.0
anaconda-navigator                 1.10.0
anaconda-project                   0.10.1
aniso8601                          9.0.1
anyio                              2.2.0
appdirs                            1.4.4
apptools                           5.1.0
argh                               0.26.2
argon2-cffi                        20.1.0
arrow                              0.13.1
asciimatics                        1.13.0
asn1crypto                         1.4.0
astor                              0.8.1
astroid                            2.6.6
astropy                            4.3.1
astunparse                         1.6.3
async-generator                    1.10
async-timeout                      3.0.1
atomicwrites                       1.4.0
attrs                              21.2.0
audioread                          2.1.9
autobahn                           21.3.1
Automat                            20.2.0
autopep8                           1.5.6
Babel                              2.9.1
backcall                           0.2.0
backports.functools-lru-cache      1.6.4
backports.shutil-get-terminal-size 1.0.0
backports.tempfile                 1.0
backports.weakref                  1.0.post1
baidu-aip                          2.2.17.0
bcrypt                             3.2.0
beautifulsoup4                     4.10.0
binaryornot                        0.4.4
bitarray                           2.3.0
bkcharts                           0.2
black                              19.10b0
bleach                             4.0.0
blinker                            1.4
bokeh                              2.3.3
boto                               2.49.0
Bottleneck                         1.3.2
brotlipy                           0.7.0
cachetools                         4.2.2
certifi                            2021.5.30
cffi                               1.14.6
chardet                            3.0.4
charset-normalizer                 2.0.4
click                              8.0.1
cloudpickle                        2.0.0
clyent                             1.2.2
colorama                           0.4.4
colorful                           0.5.4
comtypes                           1.1.10
ConcurrentLogHandler               0.9.1
conda                              4.10.3
conda-build                        3.20.5
conda-pack                         0.6.0
conda-package-handling             1.7.3
conda-suggest                      0.1.1
conda-verify                       3.4.2
configobj                          5.0.6
constantly                         15.1.0
contextlib2                        0.6.0.post1
cookiecutter                       1.7.2
coverage                           5.5
cryptography                       3.4.7
cyaron                             0.4.3
cycler                             0.10.0
Cython                             0.29.24
cytoolz                            0.11.0
dask                               2021.8.1
debugpy                            1.4.1
decorator                          5.0.9
defusedxml                         0.7.1
diff-match-patch                   20200713
dill                               0.3.4
distributed                        2021.8.1
dlib                               19.22.0
docutils                           0.17.1
dominate                           2.6.0
easydict                           1.9
easyocr                            1.4.1
einops                             0.3.0
entrypoints                        0.3
envisage                           6.0.1
et-xmlfile                         1.1.0
fastcache                          1.1.0
filelock                           3.0.12
flake8                             3.9.2
Flask                              1.1.2
Flask-Cors                         3.0.10
Flask-Limiter                      1.4
Flask-RESTful                      0.3.9
flatbuffers                        1.12
fonttools                          4.25.0
fsspec                             2021.8.1
future                             0.18.2
gast                               0.4.0
gensim                             3.8.3
gevent                             21.8.0
glfw                               2.1.0
glob2                              0.7
glumpy                             1.2.0
gmpy2                              2.0.8
google-auth                        1.33.0
google-auth-oauthlib               0.4.4
google-pasta                       0.2.0
greenlet                           1.1.1
grpcio                             1.36.1
gym                                0.19.0
h5py                               2.10.0
HeapDict                           1.0.1
html5lib                           1.1
hyperlink                          21.0.0
hypothesis                         6.14.1
idna                               3.2
imagecodecs                        2021.6.8
imageio                            2.9.0
imagesize                          1.2.0
importlib-metadata                 4.8.1
importlib-resources                5.2.2
incremental                        21.3.0
inflect                            5.3.0
inflection                         0.5.1
iniconfig                          1.1.1
intervaltree                       3.1.0
ipykernel                          6.2.0
ipython                            7.27.0
ipython-genutils                   0.2.0
ipywidgets                         7.6.3
isort                              5.9.3
itsdangerous                       2.0.1
jdcal                              1.4.1
jedi                               0.17.2
jieba                              0.42.1
Jinja2                             2.11.3
jinja2-time                        0.2.0
joblib                             1.0.1
json5                              0.9.6
jsonlines                          2.0.0
jsonschema                         3.2.0
jupyter                            1.0.0
jupyter-client                     7.0.1
jupyter-console                    6.4.0
jupyter-core                       4.7.1
jupyter-server                     1.4.1
jupyterlab                         3.1.7
jupyterlab-pygments                0.1.2
jupyterlab-server                  2.8.1
jupyterlab-widgets                 1.0.0
Keras-Applications                 1.0.8
Keras-Preprocessing                1.1.2
keyring                            23.1.0
kiwisolver                         1.3.1
lazy-object-proxy                  1.6.0
libarchive-c                       2.9
librosa                            0.8.0
limits                             1.5.1
llvmlite                           0.36.0
locket                             0.2.1
lxml                               4.6.3
macholib                           1.14
Markdown                           3.3.4
MarkupSafe                         1.1.1
matplotlib                         3.4.2
matplotlib-inline                  0.1.2
mccabe                             0.6.1
menuinst                           1.4.16
mido                               1.2.10
mistune                            0.8.4
mkl-fft                            1.3.0
mkl-random                         1.2.2
mkl-service                        2.3.0
mock                               4.0.3
more-itertools                     8.8.0
mpmath                             1.2.1
msgpack                            1.0.2
multidict                          5.1.0
multipledispatch                   0.6.0
munkres                            1.1.4
mypy-extensions                    0.4.3
MyQR                               2.3.1
navigator-updater                  0.2.1
nbclassic                          0.2.6
nbclient                           0.5.3
nbconvert                          6.1.0
nbformat                           5.1.3
nest-asyncio                       1.5.1
networkx                           2.6.2
nltk                               3.6.2
nose                               1.3.7
notebook                           6.4.3
numba                              0.53.0
numexpr                            2.7.3
numpy                              1.20.3
numpydoc                           1.1.0
oauthlib                           3.1.1
olefile                            0.46
opencv-python                      4.5.3.56
openpyxl                           3.0.7
opt-einsum                         3.3.0
packaging                          21.0
pandas                             1.3.2
pandocfilters                      1.4.3
paramiko                           2.7.2
parso                              0.7.0
partd                              1.2.0
path                               16.0.0
pathlib2                           2.3.6
pathspec                           0.7.0
pathtools                          0.1.2
patsy                              0.5.1
pefile                             2019.4.18
pep8                               1.7.1
pexpect                            4.8.0
piano-transcription-inference      0.0.4
pickleshare                        0.7.5
Pillow                             8.3.2
pip                                21.2.2
pkginfo                            1.7.1
pluggy                             0.13.1
ply                                3.11
pooch                              1.3.0
poyo                               0.5.0
prometheus-client                  0.11.0
prompt-toolkit                     3.0.17
protobuf                           3.17.2
psutil                             5.8.0
psycopg2-binary                    2.9.1
ptyprocess                         0.7.0
py                                 1.10.0
pyasn1                             0.4.8
pyasn1-modules                     0.2.8
PyAudio                            0.2.11
pycodestyle                        2.7.0
pycosat                            0.6.3
pycparser                          2.20
pycryptodome                       3.10.1
pycurl                             7.44.0
pydocstyle                         6.1.1
pyerfa                             2.0.0
pyface                             7.3.0
pyfiglet                           0.8.post1
pyflakes                           2.3.1
pygame                             2.0.1
pyglet                             1.5.18
Pygments                           2.10.0
PyInstaller                        3.6
PyJWT                              2.1.0
pylint                             2.9.6
pyls-black                         0.4.6
pyls-spyder                        0.4.0
PyNaCl                             1.4.0
pyodbc                             4.0.0-unsupported
PyOpenGL                           3.1.1a1
PyOpenGL-accelerate                3.1.5
pyOpenSSL                          20.0.1
pyparsing                          2.4.7
pypng                              0.0.20
PyQt5                              5.15.4
PyQt5-Qt5                          5.15.2
PyQt5-sip                          12.9.0
PyQtChart                          5.15.4
PyQtChart-Qt5                      5.15.2
pyqtgraph                          0.11.0
PyQtWebEngine                      5.12.1
pyreadline                         2.1
pyrsistent                         0.17.3
PySide6                            6.1.2
PySimpleGUI                        4.45.0
PySocks                            1.7.1
pytest                             6.2.4
python-bidi                        0.4.2
python-dateutil                    2.8.2
python-docx                        0.8.10
python-dotenv                      0.18.0
python-jsonrpc-server              0.4.0
python-language-server             0.36.2
python-lsp-black                   1.0.0
python-lsp-jsonrpc                 1.0.0
python-lsp-server                  1.2.2
python-slugify                     5.0.2
pytz                               2021.1
PyWavelets                         1.1.1
pywin32                            228
pywin32-ctypes                     0.2.0
pywinpty                           0.5.7
PyYAML                             5.4.1
pyzmq                              22.2.1
QDarkStyle                         3.0.2
qstylizer                          0.1.10
QtAwesome                          1.0.2
qtconsole                          5.1.0
QtPy                               1.10.0
regex                              2021.8.3
requests                           2.26.0
requests-oauthlib                  1.3.0
resampy                            0.2.2
rope                               0.19.0
rsa                                4.7.2
Rtree                              0.9.7
ruamel-yaml-conda                  0.15.100
scikit-image                       0.18.1
scikit-learn                       0.24.2
scipy                              1.7.1
seaborn                            0.11.2
Send2Trash                         1.8.0
setproctitle                       1.2.2
setuptools                         58.0.4
shiboken2                          5.15.2
shiboken6                          6.1.2
simplegeneric                      0.8.1
singledispatch                     3.7.0
sip                                4.19.13
six                                1.16.0
smart-open                         4.1.2
sniffio                            1.2.0
snowballstemmer                    2.1.0
sortedcollections                  2.1.0
sortedcontainers                   2.4.0
sounddevice                        0.4.2
SoundFile                          0.10.3.post1
soupsieve                          2.2.1
SpeechRecognition                  3.8.1
Sphinx                             4.2.0
sphinxcontrib-applehelp            1.0.2
sphinxcontrib-devhelp              1.0.2
sphinxcontrib-htmlhelp             2.0.0
sphinxcontrib-jsmath               1.0.1
sphinxcontrib-qthelp               1.0.3
sphinxcontrib-serializinghtml      1.1.5
sphinxcontrib-websupport           1.2.4
spyder                             5.1.2
spyder-kernels                     2.1.1
SQLAlchemy                         1.4.22
statsmodels                        0.12.2
sympy                              1.8
tables                             3.6.1
tblib                              1.7.0
tensorboard                        2.4.1
tensorboard-plugin-wit             1.8.0
tensorboardX                       2.4
tensorflow                         2.3.0
tensorflow-estimator               2.6.0
termcolor                          1.1.0
terminado                          0.9.4
testpath                           0.5.0
text-unidecode                     1.3
textdistance                       4.2.1
threadpoolctl                      2.2.0
three-merge                        0.1.1
tifffile                           2021.7.2
tinycss                            0.4
toml                               0.10.2
toolz                              0.11.1
torch                              1.8.1+cu111
torchaudio                         0.8.1
torchlibrosa                       0.0.9
torchvision                        0.9.1+cu111
tornado                            6.1
tqdm                               4.62.2
traitlets                          5.0.5
traits                             6.2.0
traitsui                           7.2.1
triangle                           20200424
Twisted                            21.7.0
twisted-iocpsupport                1.0.1
txaio                              21.2.1
typed-ast                          1.4.3
typing-extensions                  3.10.0.2
ujson                              4.0.2
umap                               0.1.1
unicodecsv                         0.14.1
Unidecode                          1.2.0
urllib3                            1.26.6
vtk                                9.0.3
watchdog                           2.1.3
wcwidth                            0.2.5
webencodings                       0.5.1
webrtcvad                          2.0.10
Werkzeug                           2.0.1
wheel                              0.37.0
whichcraft                         0.6.1
widgetsnbextension                 3.5.1
win-inet-pton                      1.1.0
win-unicode-console                0.5
wincertstore                       0.2
WMI                                1.5.1
wordcloud                          1.8.1
wrapt                              1.12.1
wslink                             1.0.4
wxPython                           4.1.1
xeger                              0.3.5
xlrd                               2.0.1
XlsxWriter                         3.0.1
xlwings                            0.24.7
xlwt                               1.3.0
xmltodict                          0.12.0
xonsh                              0.9.24
yapf                               0.31.0
yarl                               1.6.3
zict                               2.0.0
zipp                               3.5.0
zope.event                         4.5.0
zope.interface                     5.4.0
kevintsq commented 2 years ago

It works finally.

jjavierdguezas commented 2 years ago

It works finally.

hi, same issue here, could you please share your solution? thanks

kevintsq commented 2 years ago

I set the environment variable KMP_DUPLICATE_LIB_OK=TRUE and reboot the computer. Hope it works for you~

jjavierdguezas commented 2 years ago

I set the environment variable KMP_DUPLICATE_LIB_OK=TRUE and reboot the computer. Hope it works for you~

yeah, that worked thanks

danzz006 commented 1 year ago

Try conda install nomkl --channel conda-forge

From https://stackoverflow.com/questions/20554074/sklearn-omp-error-15-initializing-libiomp5md-dll-but-found-mk2iomp5md-dll-a