Successful Installation of Tensorflow but says Module Not Found in Verification

I have Jetson Nano, python 3.6.8 and i have created a virtual environment and followed the steps listed Installing TensorFlow for Jetson Platform :: NVIDIA Deep Learning Frameworks Documentation after logging into the virtual environment. All the requirements were satisfied however when i try to test if tensorflow is installed or not it - it gives me the error “ModuleNotFoundError: No module named tensorflow”

sudo pip3 install --pre --no-cache-dir --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

Looking in indexes: Simple index, https://developer.download.nvidia.com/compute/redist/jp/v42
Requirement already satisfied: tensorflow-gpu in /home/kandukuri/.local/lib/python3.6/site-packages (1.13.1+nv19.3)
Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.33.6)
Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.0.8)
Requirement already satisfied: grpcio>=1.8.6 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-gpu) (1.23.0)
Requirement already satisfied: numpy>=1.13.3 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (1.13.3)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (3.9.1)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied: gast>=0.2.0 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-gpu) (0.2.2)
Requirement already satisfied: tensorflow-estimator<1.14.0rc0,>=1.13.0 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-gpu) (1.13.0)
Requirement already satisfied: absl-py>=0.1.6 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-gpu) (0.7.1)
Requirement already satisfied: tensorboard<1.14.0,>=1.13.0 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-gpu) (1.13.1)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.8.0)
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (1.11.0)
Requirement already satisfied: h5py in /usr/lib/python3/dist-packages (from keras-applications>=1.0.6->tensorflow-gpu) (2.7.1)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.6.1->tensorflow-gpu) (41.1.0)
Requirement already satisfied: mock>=2.0.0 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow-gpu) (3.0.5)
Requirement already satisfied: werkzeug>=0.11.15 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu) (0.15.5)
Requirement already satisfied: markdown>=2.6.8 in /home/kandukuri/.local/lib/python3.6/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu) (3.1.1)

Hi,

Please check this comment for the suggestion:
[url]Tensorflow Intallation Failing on Xavier - Jetson AGX Xavier - NVIDIA Developer Forums

Thanks.

When i run the command “pip3 show tensorflow-gpu” it returns nothing.

Below is the output

(deep_learning) Username@MyJetsonname:~/python_environments$ pip3 show tensorflow-gpu
(deep_learning) Username@MyJetsonname:~/python_environments$

Hi,

It looks like the tensorflow-gpu is not well installed in your environment.
Would you mind to reinstall it again?

$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

You should able to see the installed package when executing the pip3 show command.
Thanks.

Was a solution found for this? I have the same issue - I install Tensorflow, and then Python says “ModuleNotFoundError”. I tried the most recent post’s command, and still nothing. pip3 show returns “WARNING: Package(s) not found: tensorflow-gpu”.

Hi, GMeister

Do you execute pip3 with url information?
The command should look like comment#4.

Thanks.

Thanks for following up. In the end, I reinstalled the whole OS for a different reason, and Tensorflow installed fine after that. Not sure what caused it, but seems to be working now. Cheers.

Hey, I am facing the same issue. Unable to import TensorFlow after successfully installing it in a virtual environment. Any solution found for this.

Thank you,

I had the same ModuleNotFound Error.
It worked, after I used Python3.6.

If tensorflow is installed in a virtual environment, note that there is no “sudo” before “pip3 install …”
official installation guide: