tensorflow / tensorflow/probability
Tensorflow probability not import into google colab
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Tensorflow probability not imported in my google colab. showing these error. how can i overcome this?
!pip install --upgrade tensorflow-probability
import tensorflow_probability
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 import tensorflow_probability
12 frames
/usr/local/lib/python3.10/dist-packages/tensorflow_probability/python/internal/tf_keras.py in
28 import tf_keras.api._v1.keras as v1
29 else:
---> 30 from tensorflow.compat.v2.keras import *
31 from tensorflow.compat.v2.keras import internal
32 import tensorflow.compat.v1 as tf1
ModuleNotFoundError: No module named 'tensorflow.compat.v2.keras'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the import failure in the Google Colab notebook using the shown pip command and import statement. Start with the traceback around tensorflow_probability/python/internal/tf_keras.py and determine what prevents tensorflow_probability from importing; done means the reported import completes without the shown ModuleNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100