Create TF records----ModuleNotFoundError: No module named 'tensorflow'

Viewed 840

!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/train'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/train.record'}

!python {SCRIPTS_PATH + '/generate_tfrecord.py'} -x {IMAGE_PATH + '/test'} -l {ANNOTATION_PATH + '/label_map.pbtxt'} -o {ANNOTATION_PATH + '/test.record'}

i'm tring to run this code but its showing error Traceback (most recent call last): File "Tensorflow/scripts/generate_tfrecord.py", line 25, in import tensorflow.compat.v1 as tf ModuleNotFoundError: No module named 'tensorflow' Traceback (most recent call last): File "Tensorflow/scripts/generate_tfrecord.py", line 25, in import tensorflow.compat.v1 as tf ModuleNotFoundError: No module named 'tensorflow'

what should i do??

1 Answers

Do you alredy install package? Try on terminal:

pip install tensorflow==2.4.1 --ignore-installed

try to sort your question and put your code right, maybe this would help: How to ask

Related