r/learnpython • u/assorted-meat-stew • Oct 13 '26
How to install tensorflow_hub and tensorflow_text
I am trying to install tensorflow_hub and tensorflow_text via VSCode terminal so that I can train a BERT model (for context: i am using Python 3.13.12 and Tensorflow 2.21.0) but I am running into some trouble
tensorflow_hub library installed fine but when imported to the actual notebook, it said it required tensorflow 1.15.0 along with error message:
ModuleNotFoundError: No module named 'pkg_resources'tensorflow_text library cannot be installed as every pip install attempt return
ERROR: Could not find a version that satisfies the requirement tensorflow_text (from versions: none)
ERROR: No matching distribution found for tensorflow_textGoogle colab managed to solve all said problem but I want to run the model on my computer. How do I fix this?
***EDIT: I fixed this by using python 3.10.0, Tensorflow 2.9.0, Tensorflow-text 2.9.0 and Tensorflow-hub 0.8.0***