Tensorflow installed on NVIDIA JETSON, but no module named tensorflow

Hi, I have an issue using tensorflow on my NVIDIA AGX xavier. I need to use tensorflow for a project, and managed to install tensorflow successfully. I managed to verify the installation by importing tensorflow and doing pip3 show tensorflow.

However, when running my program (ROS related program), the program fails with an error saying there is no module named tensorflow.

I’ve tried exporting python path but that seems to mess with all my other programs. On a separate system I managed to run my program without having to export the python path so I doubt the python path is the issue here. Reinstalling didn’t work either.

My system specifications are as follows:
-Ubuntu 18.04
-ROS melodic
-Python 3.6.9
-Tensorflow version: 2.6.2+nv21.12

Much help is appreciated!


Would you mind checking which python version is used in the ROS environment?
Since the package is built for Python 3.6, you won’t be able to import it if another version is used in the ROS.


Based on my understanding, and correct me if I’m wrong, the python version in the ROS environment is python 3, not python 3.6.

Following the tutorial, I configured the catkin_make with python 3 using catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3. I tried creating another workspace with python 3.6 using catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3.6, but tensorflow still cant be imported.


Python 3 has some sub-version.
Usually, the default version will change based on the OS.

Would you mind running the following command under the ROS environment to check it first?

$ python3 --version


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.