cancel
Showing results for 
Search instead for 
Did you mean: 

Using AI v5.1.1 I get this error. IO ERROR: Nor Keras nor tf.keras installed.

JArgu.1
Associate II

Analyzing model 

C:/Users/Hector Gonzalez/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.1.1/Utilities/windows/stm32ai analyze --name network -m C:/Users/Hector Gonzalez/Desktop/classification_model.h5 --type keras --compression 1 --verbosity 1 --workspace C:\Users\HECTOR~1\AppData\Local\Temp\mxAI_workspace11378610577003599069257813762485 --output C:\Users\Hector Gonzalez\.stm32cubemx\stm32ai_output  

Neural Network Tools for STM32 v1.3.0 (AI tools v5.1.1) 

TOOL ERROR: Nor Keras nor tf.keras installed. 

Creating report file C:\Users\Hector Gonzalez\.stm32cubemx\stm32ai_output\network_analyze_report.txt 

IO ERROR: Nor Keras nor tf.keras installed. 

Exec/report summary (analyze dur=-0.00s err=-1) 

------------------------------------------------------------------------------------------------------------------------ 

error              : IO ERROR: Nor Keras nor tf.keras installed. 

model file         : C:\Users\Hector Gonzalez\Desktop\classification_model.h5 

Nor Keras nor tf.keras installed. 

Using TensorFlow backend. 

Using TensorFlow backend. 

Using TensorFlow backend.

4 REPLIES 4
JArgu.1
Associate II

This I get when this stm32ai --tools-version command is executed

C:\Users\Hector Gonzalez>stm32ai --tools-version

Using TensorFlow backend.

Traceback (most recent call last):

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>

  from tensorflow.python.pywrap_tensorflow_internal import *

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>

  _pywrap_tensorflow_internal = swig_import_helper()

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper

  _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

 File "imp.py", line 242, in load_module

 File "imp.py", line 342, in load_dynamic

ImportError: DLL load failed: Error en una rutina de inicialización de biblioteca de vínculos dinámicos (DLL).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

 File "stm32ai.py", line 510, in <module>

 File "stm32ai.py", line 490, in main

 File "stm32ai.py", line 430, in setup_cli

 File "stm32ai.py", line 193, in early_update_args

 File "stm32ai.py", line 138, in tools_version

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\__init__.py", line 3, in <module>

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\utils\__init__.py", line 6, in <module>

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\utils\conv_utils.py", line 9, in <module>

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\backend\__init__.py", line 1, in <module>

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\backend\load_backend.py", line 90, in <module>

 File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module

 File "site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow\__init__.py", line 98, in <module>

  from tensorflow_core import *

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\__init__.py", line 40, in <module>

  from tensorflow.python.tools import module_util as _module_util

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow\__init__.py", line 50, in __getattr__

  module = self._load()

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow\__init__.py", line 44, in _load

  module = _importlib.import_module(self.__name__)

 File "importlib\__init__.py", line 126, in import_module

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\__init__.py", line 49, in <module>

  from tensorflow.python import pywrap_tensorflow

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>

  raise ImportError(msg)

ImportError: Traceback (most recent call last):

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>

  from tensorflow.python.pywrap_tensorflow_internal import *

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>

  _pywrap_tensorflow_internal = swig_import_helper()

 File "C:\Users\Hector Gonzalez\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.0\Utilities\windows\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper

  _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

 File "imp.py", line 242, in load_module

 File "imp.py", line 342, in load_dynamic

ImportError: DLL load failed: Error en una rutina de inicialización de biblioteca de vínculos dinámicos (DLL).

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace

above this error message when asking for help.

[13164] Failed to execute script stm32ai

AAgar.2
Associate III

Dont want to state the obvious but a seems like a DLL is missing. Can you please translate that import error?

JArgu.1
Associate II

Thanks for helping. import error translation is as follows::

A dynamic link library (DLL) initialization routine failed.

I have tried installing Visual C++ 2015-2019 as mention on some post.

EZeli.1
Associate II

Hi, have you found a workaround for this error in the end? I am also stuck at this but I didn't find anything else online. Thanks :)