Skip to content

Failure to run create_tflm_tree.py; ModuleNotFoundError: No module named 'numpy' #2052

@snowtrout

Description

@snowtrout

System information:
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10; WSL2
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): 2.12.0
Python version: 3.10.6
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory:
Exact command to reproduce:

python3 tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py
-e hello_world
-e micro_speech
-e person_detection
/tmp/tflm-tree

Describe the problem:

I am attempting to port tflite-micro to STM32CUBE IDE to program a STM32H745I-DISCO. However, when I run the above command to build the library I get "ModuleNotFoundError: No module named 'numpy'". I am currently working in a pip env with numpy version 1.23.5. I am doing all of this using Ubuntu via WSL2. Any help would be appreciated.

The error:

Traceback (most recent call last):
File "/home/mtrout/tflite-micro/tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py", line 303, in
main()
File "/home/mtrout/tflite-micro/tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py", line 279, in main
raise RuntimeError("%s failed with \n\n %s" %
RuntimeError: make -f tensorflow/lite/micro/tools/make/Makefile third_party_downloads failed with

tensorflow/lite/micro/tools/make/downloads/flatbuffers already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/kissfft already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/pigweed already exists, skipping the download.
Traceback (most recent call last):
File "/home/mtrout/tflite-micro/tensorflow/lite/micro/tools/generate_cc_arrays.py", line 25, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
tensorflow/lite/micro/examples/memory_footprint/Makefile.inc:25: *** Something went wrong: . Stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions