No module named nvml using tlt-dataset-convert

Ubuntu 18.04 latest, RTX2080ti, tlt-streamanalytics:v2.0_dp_py2 container

I receive the error below (no module named nvml) when I run the tlt-dataset-convert command in the detectnet_v2 example. Deepstream 5 works fine on this box outside the container.

print(“Converting Tfrecords for kitti trainval dataset”)
!tlt-dataset-convert -d $SPECS_DIR/detectnet_v2_tfrecords_kitti_trainval.txt
-o $DATA_DOWNLOAD_DIR/tfrecords/kitti_trainval/kitti_trainval

************Output **************

Creating a new directory for the output tfrecords dump.

print(“Converting Tfrecords for kitti trainval dataset”)

!tlt-dataset-convert -d $SPECS_DIR/detectnet_v2_tfrecords_kitti_trainval.txt \

                 -o $DATA_DOWNLOAD_DIR/tfrecords/kitti_trainval/kitti_trainval

Converting Tfrecords for kitti trainval dataset
Using TensorFlow backend.
Traceback (most recent call last):
File “/usr/local/bin/tlt-dataset-convert”, line 5, in
from iva.detectnet_v2.scripts.dataset_convert import main
File “./detectnet_v2/scripts/”, line 14, in
File “./detectnet_v2/dataio/”, line 13, in
File “./detectnet_v2/dataio/”, line 22, in
File “./detectnet_v2/dataio/”, line 20, in
File “./detectnet_v2/dataloader/”, line 15, in
File “/usr/local/lib/python2.7/dist-packages/modulus/”, line 8, in
from modulus import blocks
File “/usr/local/lib/python2.7/dist-packages/modulus/blocks/”, line 22, in
from modulus.blocks import data_loaders
File “/usr/local/lib/python2.7/dist-packages/modulus/blocks/data_loaders/”, line 9, in
from modulus.blocks.data_loaders.sqlite_dataloader import SQLiteDataLoader
File “./modulus/blocks/data_loaders/”, line 10, in
File “/usr/local/lib/python2.7/dist-packages/modulus/dataloader/”, line 8, in
from modulus.dataloader import humanloop
File “./modulus/dataloader/”, line 16, in
File “/usr/local/lib/python2.7/dist-packages/modulus/processors/”, line 26, in
from modulus.processors.buffers import NamedTupleStagingArea
File “./modulus/processors/”, line 10, in
File “/usr/local/lib/python2.7/dist-packages/modulus/hooks/”, line 9, in
from modulus.hooks.hooks import KerasCheckpointListener
File “./modulus/hooks/”, line 26, in
ImportError: No module named nvml


Please paste your


Please run below and paste the result too.
$ nvidia-smi

Archive: /opt/ngccli/
inflating: /opt/ngccli/ngc
extracting: /opt/ngccli/ngc.md5
root@ece58f118dd7:/workspace# nvidia-smi
Tue Jun 16 14:49:35 2020
| NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce RTX 208… On | 00000000:01:00.0 On | N/A |
| 35% 26C P8 23W / 260W | 323MiB / 11016MiB | 2% Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |

kitti_config {
root_directory_path: “/workspace/tlt-experiments/data/training”
image_dir_name: “image_2”
label_dir_name: “label_2”
image_extension: “.png”
partition_mode: “random”
num_partitions: 2
val_split: 14
num_shards: 10
image_directory_path: “/workspace/tlt-experiments/data/training”

Looks nvidia-smi runs smoothly.
This is the first time to see “ImportError: No module named nvml” in TLT. Other users do not meet this issue.

How did you trigger the docker? Is it below?
docker run --runtime=nvidia -it /bin/bash

Also please double check below.

Software Requirements

Ubuntu 18.04 LTS
NVIDIA GPU Cloud account and API key -
docker-ce installed,
nvidia-docker2 installed, instructions:
NVIDIA GPU driver v410.xx or above

Note: DeepStream 5.0 - NVIDIA SDK for IVA inference is recommended.

Installation Prerequisites

Install Docker. See:
NVIDIA GPU driver v410.xx or above. Download from
Install NVIDIA Docker 2 from:

I also encountered a similar problem. I downloaded the tlt mirror directly over the wall.

Hi jiyuwang,

Please help to open a new topic for your issue. Thanks