Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'tensorflow_hub'

I followed instructions given in the TensorFlow website to install tensorflow_hub and installed it within a conda environment.

$ pip install "tensorflow>=2.0.0"
$ pip install --upgrade tensorflow-hub

I ran the above in anaconda prompt

enter image description here

But I'm still getting ModuleNotFoundError for 'tensorflow_hub'.

Any help here is appreciated. Thanks in advance

like image 983
Abhiram kadali Avatar asked Sep 14 '20 12:09

Abhiram kadali


1 Answers

First thing Check whether you have installed tensorflow_hub within that environment

conda list

If you can not find it there, maybe you have been installing it to another environment which does not matter, just install it again here.

pip install tensorflow_hub

You have probably done that so most likely you are using another kernel within your jupyter notebook, so either go to the environment of that kernel and install your package there. Or the preferred way, install your current environment yourenvironment as a new kernel and use that one in your jupyter notebook

  python -m ipykernel install --user --name=yourenvironment

Now start your jupyter notebook and enjoy your package

like image 65
mrk Avatar answered Sep 22 '22 04:09

mrk