Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run ``: "No module named 'tensorflow.python.types'"

See original GitHub issue

I followed the instructions (I think):

$ cd deformable-ravens
$ git log -n 1 --oneline --no-decorate
6ff2443 remove outdated bag files (we're using the other ones)
$ conda create -n py3-bullet python=3.7
$ conda activate py3-bullet
$ ./

Then I got the following error:

$ python -h
pybullet build time: Sep 22 2020 00:55:20
Detected TensorFlow version:  2.2.0
Traceback (most recent call last):
  File "./", line 45, in <module>
    from ravens import Dataset, Environment, agents, tasks
  File ".../deformable-ravens/ravens/", line 2, in <module>
    import ravens.agents as agents
  File ".../deformable-ravens/ravens/agents/", line 1, in <module>
    from ravens.agents.dummy import DummyAgent
  File ".../deformable-ravens/ravens/agents/", line 10, in <module>
    from ravens.models import Attention, Transport
  File ".../deformable-ravens/ravens/models/", line 6, in <module>
    from ravens.models.conv_mlp import ConvMLP
  File ".../deformable-ravens/ravens/models/", line 5, in <module>
    import tensorflow_hub as hub
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_hub/", line 29, in <module>
    from tensorflow_hub.estimator import LatestModuleExporter
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_hub/", line 64, in <module>
    class LatestModuleExporter(tf_v1.estimator.Exporter):
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow/python/util/", line 62, in __getattr__
    module = self._load()
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow/python/util/", line 45, in _load
    module = importlib.import_module(self.__name__)
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/", line 10, in <module>
    from tensorflow_estimator._api.v1 import estimator
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/_api/v1/estimator/", line 10, in <module>
    from tensorflow_estimator._api.v1.estimator import experimental
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/_api/v1/estimator/experimental/", line 10, in <module>
    from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/canned/", line 31, in <module>
    from tensorflow_estimator.python.estimator import estimator
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/", line 51, in <module>
    from tensorflow_estimator.python.estimator import model_fn as model_fn_lib
  File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/", line 29, in <module>
    from tensorflow.python.types import core
ModuleNotFoundError: No module named 'tensorflow.python.types'

See output of conda list --export here:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

DanielTakeshicommented, Jun 10, 2021

Ah, actually maybe the reason why I had TensorFlow 2.2 listed in the installation script is that on Google cloud machines (which I used when I worked on this project) I was using pip install tensorflow and did that for 2.2. But, I think on my local machines where I was getting the usual CUDA incompatibility nightmares, I went for a simpler conda install. But, for that, I actually needed TensorFlow 2.3.0.

I’m going to merge the pull request from #6 , I think that’s the easiest way going forward.

PeterQiu0516commented, Jun 9, 2021

Exactly same issue here, on Ubuntu 20.04, and the output of conda list under the installed environment could be found here:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tensorboard - No module named 'tensorflow.python.types'
I try to use tensorboard but I have meet the error tensorboard ERROR: Failed to launch TensorBoard (exited with 1).
Read more >
No module named 'tensorflow.python.types' when building ...
I've been trying to install TensorFlow with Anaconda on Windows for a few days now. Every version of the 2.x.x branch of TensorFlow...
Read more >
[Solved] No Module Named Tensorflow Error - Python Pool
The main problem arises when you're using multiple python versions and their virtual environment. Keep in mind that, Anaconda, PyCharm, Jupyter, ...
Read more >
How to Fix ModuleNotFoundError (No Module Named) Error ...
in a virtual environment or using Python 2pip install numpy# 👇️ for python 3 (could also be pip3.10 depending on your version)pip3 install ......
Read more >
ModuleNotFoundError No module named cv2 - Edureka
Hi@akhtar,. This error may occur if you didn't install opencv module in your system. So first check this module is available or not....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found