Unable to run `main.py`: "No module named 'tensorflow.python.types'"
See original GitHub issueI 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
$ ./install_python_ubuntu.sh
Then I got the following error:
$ python main.py -h
pybullet build time: Sep 22 2020 00:55:20
Detected TensorFlow version: 2.2.0
Traceback (most recent call last):
File "./main.py", line 45, in <module>
from ravens import Dataset, Environment, agents, tasks
File ".../deformable-ravens/ravens/__init__.py", line 2, in <module>
import ravens.agents as agents
File ".../deformable-ravens/ravens/agents/__init__.py", line 1, in <module>
from ravens.agents.dummy import DummyAgent
File ".../deformable-ravens/ravens/agents/dummy.py", line 10, in <module>
from ravens.models import Attention, Transport
File ".../deformable-ravens/ravens/models/__init__.py", line 6, in <module>
from ravens.models.conv_mlp import ConvMLP
File ".../deformable-ravens/ravens/models/conv_mlp.py", line 5, in <module>
import tensorflow_hub as hub
File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow_hub/__init__.py", 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/estimator.py", 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/lazy_loader.py", line 62, in __getattr__
module = self._load()
File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/site-packages/tensorflow/python/util/lazy_loader.py", line 45, in _load
module = importlib.import_module(self.__name__)
File "{home}/.local/opt/miniconda3/envs/py3-bullet/lib/python3.7/importlib/__init__.py", 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/__init__.py", 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/__init__.py", 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/__init__.py", 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/dnn.py", 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/estimator.py", 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/model_fn.py", line 29, in <module>
from tensorflow.python.types import core
ModuleNotFoundError: No module named 'tensorflow.python.types'
See output of conda list --export
here:
https://gist.github.com/EricCousineau-TRI/50284aba406e965956a2827de37745b1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Exactly same issue here, on Ubuntu 20.04, and the output of
conda list
under the installed environment could be found here: https://gist.github.com/PeterQiu0516/f9e83faf42ee2a1d6e3a6240f71d52dd