Comments (16)
Just for reference. I also encountered this "ModuleNotFoundError: No module named google.protobuf" issue when I tried to installed tensorflow in a virtualenv recently.
The solution I applied to solve the problem is: tensorflow/tensorflow#6341 (comment). That is, find whether the "google.protobuf" python module is installed and delete the google/__init__.py file.
from jetson_nano.
I faced similar issue with latest jetpack 4.3 on my jetson tx2 on tf 2.1 insatllation from nvidia doc.
I installed protobuf 3.8.0(C++) using your script since i faced loading time issue.
But after installation it showed : ModuleNotFoundError: No module named 'google.protobuf.
I uninstalled it and tried with the corresponding python version and it worked without any issue. Still, there was loading time issue with tf-trt ...
The python protobuf default path was : /usr/local/lib/python3.6/dist-packages/google/
C++ version has path : /usr/local/lib/python3.6/dist-packages/protobuf-3.8.0-py3.6-linux-aarch64.egg/google
So once you uninstall python protobuf ,just copy all the data in the later path(google) to former one(google).
Now the loading time is just couple of seconds and your script seems to work with latest jetpack 4.3 +tf2.1 as well...
Just modify the path as required ...
from jetson_nano.
Could you provide more information about the issue?
- Which script were you executing when you encountered this issue?
- Were you running the script on a Jetson Nano or other platforms?
from jetson_nano.
Tensorflow 2.0 on Jetson nano. Latest jetpack.
from jetson_nano.
Please refer to my Building TensorFlow 2.0.0 on Jetson Nano post.
I would install protobuf-3.8.0 before building tensorflow-2.0.0.
from jetson_nano.
How do I remove the install and start over?
from jetson_nano.
$ sudo pip3 unsinstall tensorboard tensorflow-estimator tensorflow
$ rm -rf ${HOME}/src/protobuf-3.8.0
$ rm -rf ${HOME}/src/tensorflow-2.0.0
$ cd ${HOME}/project/jetson_nano
$ ./install_protobuf-3.8.0.sh
$ ./install_bazel-0.26.1.sh # in case you haven't installed this
$ ./install_tensorflow-2.0.0.sh
from jetson_nano.
Did the fixes you suggested....still failed.
ERROR: /root/src/tensorflow-2.0.0/tensorflow/python/keras/api/BUILD:13:1: Executing genrule //tensorflow/python/keras/api:keras_python_api_gen failed (Exit 1)
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/c947dfdeac38de357c082f7627564630/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_1_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in
from tensorflow.python.tools.api.generator import doc_srcs
File "/root/.cache/bazel/_bazel_root/c947dfdeac38de357c082f7627564630/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_1_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/python/init.py", line 52, in
from tensorflow.core.framework.graph_pb2 import *
File "/root/.cache/bazel/_bazel_root/c947dfdeac38de357c082f7627564630/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/keras/api/create_tensorflow.python_api_1_keras_python_api_gen.runfiles/org_tensorflow/tensorflow/core/framework/graph_pb2.py", line 7, in
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google.protobuf'
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 198175.813s, Critical Path: 1404.69s
INFO: 17405 processes: 17405 local.
FAILED: Build did NOT complete successfully
from jetson_nano.
Could you verify that python3 "protobuf" module has been installed by pip3 show protobuf
?
from jetson_nano.
This is the output...
Name: protobuf
Version: 3.8.0
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /usr/local/lib/python3.6/dist-packages/protobuf-3.8.0-py3.6-linux-aarch64.egg
Requires: six, setuptools
Required-by: uff
from jetson_nano.
The output is as expected. protobuf-3.8.0 for python3 has been installed.
You should be able to do import google.protobuf
in python3, right?
I wonder why you got this error: ModuleNotFoundError: No module named 'google.protobuf'
, when building tensorflow-2.0.0...
from jetson_nano.
not sure. I'm going to build the lower version for now as I need to get my project back online, but I'm planning on upgrading the jetpack on my other nano so I'll start fresh again there.
only thing i can think of is the script is calling for it via a different version of python.
from jetson_nano.
FYI, tried the lower build... Failed very quickly. I just went and did the one on the Nvidia site and that worked. I liked the design but the script just didn't work for me.
from jetson_nano.
I'm sorry to hear that my script didn't work for you, but definitely glad to know that you got the problem resolved anyway.
If I'm able to reproduce the problem later on, I would do my best to fix the issue.
from jetson_nano.
Thanks again for sharing this.
from jetson_nano.
Just for reference. I also encountered this "ModuleNotFoundError: No module named google.protobuf" issue when I tried to installed tensorflow in a virtualenv recently.
The solution I applied to solve the problem is: tensorflow/tensorflow#6341 (comment). That is, find whether the "google.protobuf" python module is installed and delete the google/init.py file.
For example, if the virtual environment is called cv, run the following commands:
cd ~/cv/lib/python3.6/site-packages/protobuf-3.17.3-py3.6-linux-aarch64.egg/google/
rm __init__.py
I am using:
JetPack - 4.5.1
Tensorflow - 2.5.0
protobuf - 3.17.3
from jetson_nano.
Related Issues (20)
- patch of tensorflow/opencv HOT 5
- Cannot build OpenCV-3.4.6 in Jetson Nano HOT 4
- time on install tensorflow 1.15 with jetpack v4.4 HOT 2
- not installed numpy on jetpack 4.4 on jetson nano2 HOT 2
- Could not find any cuda.h matching version '10.0' in any subdirectory HOT 4
- Did you try to install TF2.4 from source with GPU accel on Nano or NX? HOT 1
- keras_python_api_gen_compat_v2 failed HOT 12
- tensorflow 2.0.0 build error HOT 4
- Error using the script HOT 9
- Error installing protobuf-3.8.0.sh HOT 1
- Issues during installing TF 1.15 HOT 2
- hello, i installed protobuf using your script, but i come to an issue, please help HOT 1
- testing out demo 5 YOLOv4
- Latest Tensor Flow version
- jetpack-4.3 upgrade pip3 command not found HOT 2
- build whl tensorflow 1.12 and not tensorflow-gpu-1.12 HOT 1
- build tensorflow 1.15 HOT 1
- install opencv_3.4.8 on jetson nano HOT 3
- build tensorflow on jetson nano HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetson_nano.