VPI Python Import Error

Hi everyone,

I am currently trying to get the stereo disparity estimator in the VPI to work with Python but there is a problem with the import section. No module error is thrown. When currently installed modules are checked, VPI is not on the list.

import vpi

Gives “no module named vpi” error. I can’t import VPI using Python 3.7.1. Python 2.7 also gives the same error.

However, i think the VPI 1.1 is installed on the system because when I check with

apt show cache nvidia-vpi

The log result is below


Package: nvidia-vpi

Version: 4.5.1-b17

Priority: standard

Section: metapackages

Maintainer: NVIDIA Corporation

Installed-Size: 199 kB

Depends: libnvvpi1 (= 1.0.15), vpi1-dev (= 1.0.15), vpi1-samples (= 1.0.15), vpi1-demos (= 1.0.15)

Homepage: http://developer.nvidia.com/jetson

Download-Size: 29,3 kB

APT-Manual-Installed: yes

APT-Sources: https://repo.download.nvidia.com/jetson/t210 r32.5/main arm64 Packages

Description: NVIDIA Vpi Meta Package

N: Unable to locate package cache

N: Unable to locate package cache

N: There is 1 additional record. Please use the '-a' switch to see it

I can also run the VPI Remap demo with the “VPI Demos V1.0” on the desktop. It opens a folder with a single demo in it. It is the “VPI Remap Demo 1.0”. When I run it, it connects to my camera and 4 video streams with different transformations (mirror, pinch, whirl, waves) run simultaneously on CUDA.

Jetson Nano 4GB
Ubuntu 18.04.6 LTS

Any help would be appreciated, Thanks


Please noted that VPI is compiled with the default python version, which should be version 3.6.
Would you mind importing it with python 3.6 to see if it works?


Hi, thank you for answering. I currently have multiple python installations on my system. One of them is Python 3.6.9.

I don’t know if it should be exactly Python 3.6.0 but it again gave “no module named vpi” error.

Code i tried:

import sys


import vpi


3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0]
Traceback (most recent call last):
  File "/home/cezeri/Gimbal/VPI_import_test.py", line 5, in <module>
    import vpi
ModuleNotFoundError: No module named 'vpi'

I believe the problem is something about the packages because I don’t have any packages for python-vpi connection.

Index, In this link there are many packages for Jetpack versions.

There are some packages that look like python-vpi stuff. I believe non them of are installed on my system.

For example:

  • python-vpi1_1.2.3_arm64.deb
  • python-vpi1_1.1.12_arm64.deb
  • python-vpi1_1.1.15_arm64.deb

Just searching for “python-vpi” string with CTRL+F in that web page shows many packages like those.

My Jetpack version might not be suitable with these packages because there is no such package under Jetpack 4.5.

When I run dpkg -l | grep vpi command the output says

dpkg -l | grep vpi
ii  libnvvpi1                                     1.0.15                                     arm64        NVIDIA Vision Programming Interface library
ii  nvidia-vpi                                    4.5.1-b17                                  arm64        NVIDIA Vpi Meta Package
ii  vpi1-demos                                    1.0.15                                     arm64        NVIDIA VPI GUI demo applications
ii  vpi1-dev                                      1.0.15                                     arm64        NVIDIA VPI C/C++ development library and headers
ii  vpi1-samples                                  1.0.15                                     arm64        NVIDIA VPI command-line sample applications```

Re-installing the whole system and os with Jetpack 4.6 fixed it

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