A problem with TensorFlow

I need to test DeepPavlov in order to decide whether we can use it for our projects. Now I wish to play around (just execute, not train) with it on a typical office computer with Pentium CPU and only 4 Gb.
I followed https://habr.com/ru/company/mipt/blog/472890/ to install DeepPavlov and adapted the instructions for squad_ru_bert_infer since I’m interested in FAQ answering. The installation completed successfully/ But when I start the REST server with
python -m deeppavlov riseapi squad_ru_bert_infer -p 5005
I get error

ImportError: DLL load failed: Произошел сбой в программе инициализации библиотеки динамической компоновки (DLL).
Failed to load the native TensorFlow runtime.

Stackoverflow ( https://stackoverflow.com/questions/54609544/how-to-fix-importerror-dll-load-failed-when-importing-keras) recommends manual installation of Tensorflow version build escpecially for CPU without AVX. I’ve installed ‘tensorflow-1.15.2-cp37-cp37m-win_amd64.whl’, but this didn’t help.
Can you please advice what to do?
My system info: Windows 10 Corporate, Python 3.7.6. Visual C++ Redistributables are installed (2005-2019).

Hi @mikadi,

You can try and install this TensorFlow wheel: https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.14.0/py37/CPU/sse2
It might help but I’m not sure.

1 Like

Thank you, @yoptar! This really worked! I’ve tried versions 1.12.0 and 1.15.2 before with no success, but version 1.14.0 helped.

I had the issue while installing and testing DeepPavlov for a bot development project.
this is the code that I used.
// this was for the chatbot development services that I worked on.

Using TensorFlow backend.
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: Произошел сбой в программе инициализации библиотеки динамической компоновки (DLL).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Admin/PycharmProjects/keras/test.py", line 3, in <module>
    from keras.models import Sequential
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\__init__.py", line 3, in <module>
    from . import utils
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
    from . import conv_utils

File “C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\conv_utils.py”, line 9, in
from … import backend as K
File “C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend_init_.py”, line 89, in
from .tensorflow_backend import *