TransWikia.com

TensorFlow stopped working after installing opencv

Data Science Asked on October 1, 2021

I am working on projects that use TensorFlow and Keras and I did the hello-world MNIST project successfully and later I tried to run some other project and TF suddenly stopped working. Now it doesn’t even work on the old project. I am working in conda envs and my editor is VSC. Here is the error that I am getting:

Traceback (most recent call last):
  File "c:/Users/miliv/MLRadionica/TensProba.py", line 3, in <module>
    from tensorflow import nn
  File "C:UsersmilivMiniconda3envstflibsite-packagestensorflow__init__.py", line 101, in <module>
    from tensorflow_core import *
  File "C:UsersmilivMiniconda3envstflibsite-packagestensorflow_core__init__.py", line 40, in <module>
    from tensorflow.python.tools import module_util as _module_util
ModuleNotFoundError: No module named 'tensorflow.python.tools'; 'tensorflow.python' is not a package

I tried reinstalling TensorFlow a couple of times but it didn’t help. The only thing that comes to my mind is that it has to do something with installing OpenCV maybe because of some packages, but I haven’t changed anything else.

I have tried creating a new conda env with TF and without OpenCV but it still throws me the same error.

One Answer

The first and foremost thing we needs to aware is , from installation perspective is there any micro level relationship between tensorflow and openCV , so that it could help us out in troubleshooting the above issue.

But yes this link will help you out in accomplishing your tensorflow/openCV setup installation

Answered by Durga K on October 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP