Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 49

Import tensorflow in ROS kinetic

$
0
0
Hello everyone, I am having some troubles to use Tensorflow in ROS Kinetic. The error message is: (no error with catkin_make) process[Filter-1]: started with pid [21302] process[CallTensorflow-2]: started with pid [21303] Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/zoe/tensorflow-for-poets-2/scripts/label_image.py", line 25, in import tensorflow as tf ImportError: No module named tensorflow My python node is calling a .sh file which want to use and import tensorflow. Tensorflow is installed on my computer as we can see: Name: tensorflow Version: 1.7.0 Summary: TensorFlow helps the tensors flow Home-page: https://www.tensorflow.org/ Author: Google Inc. Author-email: opensource@google.com License: Apache 2.0 Location: /usr/local/lib/python3.5/dist-packages Requires: wheel, numpy, astor, protobuf, tensorboard, termcolor, gast, absl-py, grpcio, six As tensorflow is installed in python 3.5 I can only import with python3 in the terminal zoe@PC-ZOE:~$ python >>> import tensorflow as tf Traceback (most recent call last): File "", line 1, in ImportError: No module named tensorflow zoe@PC-ZOE:~$ python3 >>> import tensorflow as tf What I have already try: - change the header of the python node to `#!/usr/bin/env python3` - add `source ~/tensorflow/bin/activate` at the beginning of my .sh file. - make `source ~/tensorflow/bin/activate` before roslaunch - add `python-tensorflow-pip`in the package.xml but I can't rosdep python-tensorflow-pip (as I see here https://answers.ros.org/question/228940/integrating-tensorflow-into-ros/) Can anyone help me, please? Thank you.

Viewing all articles
Browse latest Browse all 49

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>