Tf2.3 and jetpack 4.5 show /proc/driver/nvidia/version does not exist

Hello, I’m using tensorflow 2.3.0 with jetpack 4.5.1.
I want to check if my GPU is properly loaded in tensorflow, so I executed “tf.config.list_physical_devices()” in python.
but it said “/proc/driver/nvidia/version does not exist.”, and it shows that GPU device is not in the list.
Here’s the message of executing the command:

Python 3.6.9 (default, Nov 25 2022, 14:10:45) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2023-02-16 21:34:28.270428: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library
>>> tf.config.list_physical_devices()
2023-02-16 21:35:22.127313: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library
2023-02-16 21:35:22.218903: E tensorflow/stream_executor/cuda/] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
2023-02-16 21:35:22.219017: I tensorflow/stream_executor/cuda/] kernel driver does not appear to be running on this host (tom-b01): /proc/driver/nvidia/version does not exist
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), PhysicalDevice(name='/physical_device:XLA_CPU:0', device_type='XLA_CPU')]

By the way, I’m using jetson nano b01.

Hi, TWTom

Did you install Jetpack using the sdkmanager? These kind of issues could be related to missing CUDA drivers and other essential NVIDIA software components. Make sure to select “Jetson SDK components” during the sdkmanager installation process. For reference you can check this link: Installing Jetpack 4.6 | NVIDIA SDK Manager | RidgeRun Developer - RidgeRun Developer Connection

You could also verify if you have following lines in your Python script

import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'

Jafet Chaves,
Embedded SW Engineer at RidgeRun
Contact us:
Developers wiki:

1 Like

Thanks for your answer, jchaves.

I first tried adding export CUDA_VISIBLE_DEVICES=1 to my .bashrc file then do source .bashrc, but unfortunately it didn’t work. Then I also tried 0 and 2, but they also didn’t work, too.

Then I tried using sdkmanager. Because I’m using windows, I went through a lot of trouble using wsl2. I think the part I’m worried about is that I edited my /usr/lib/os-release to make sdkmanager think i’m using ubuntu 18.04. But at last it can download the components. But after download done, when installing “File System and OS”, it said:

ERROR: File System and OS - target_image: E: Package 'python' has no installation candidate

So I entered the command:
sudo apt install python2
But I can’t access python2 by entering python.
So I added an alias:
alias python="python2"
I opened my console and check if python worked, and it’s properly working.
So I restarted sdkmanager and tested if it can properly install and flash now, but I got no luck. Still the same problem.
Here’s the exported logs, hope it helps.

Many thanks.

Apparently, SDK manager does not work on Ubuntu 20.04.
After I installed Ubuntu 18.04 on wsl2, the problem solved. And now my jetson nano jetpack version is 4.6.3 and have TF 2.4.0 installed.

1 Like

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