Could not import vpi module in Python 3.9

Summary

In JetPack 5.1.1, VPI 2.2.6 was installed for Python 3.8 and Python 3.9.
But, I could not import vpi module in Python 3.9.

$ python3.9
Python 3.9.5 (default, Nov 23 2021, 15:27:38) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vpi
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 17, in <module>
    from . import multiarray
  File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

Does NVIDIA release JetPack package without testing?

Environment

  • Jetson Orin NX(16GB)
  • JetPack 5.1.1
  • VPI 2.2.6
ii  libnvvpi2                                  2.2.6                                arm64        NVIDIA Vision Programming Interface library
ii  python3.8-vpi2                             2.2.6                                arm64        NVIDIA VPI python 3.8 bindings
ii  python3.9-vpi2                             2.2.6                                arm64        NVIDIA VPI python 3.9 bindings
ii  vpi2-demos                                 2.2.6                                arm64        NVIDIA VPI GUI demo applications
ii  vpi2-dev                                   2.2.6                                arm64        NVIDIA VPI C/C++ development library and headers
ii  vpi2-samples                               2.2.6                                arm64        NVIDIA VPI command-line sample applications

Supplementary information

I could import vpi module in Python 3.8.

$ python3.8
Python 3.8.10 (default, Mar 13 2023, 10:26:41) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vpi

Hi,

Based on the error message, you don’t install numpy for Python 3.9.
Could you install it and try it again?

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

Thanks.

@AastaLLL

Based on the error message, you don’t install numpy for Python 3.9.

I checked that NumPy was installed.

python3.9 -m pip list | grep numpy
numpy                  1.17.4

Could you install it and try it again?

I reinstalled NumPy by the following command.

sudo apt install python3.9-dev
sudo python3.9 -m pip install --upgrade --no-deps --force-reinstall numpy==1.17.4

As a result, I could avoid this error. But, I have doubts.
Why is the package broken at the time NVIDIA provides it?

Hi,

In JetPack, we only provide VPI for Python 3.9.
Users will need to install the dependencies like NumPy on their own.

Thanks.

In JetPack, we only provide VPI for Python 3.9.

I understood the policy.

Users will need to install the dependencies like NumPy on their own.

Users could not know this assumption.
So, I think that NVIDIA should specify this point in the document.

And, broken NumPy package was installed when user install nvidia-jetpack via apt.
So, I think that the situation where the NumPy must be reinstalled is incorrect.

Hi,

Thanks for the suggestion.
We will check this with our internal team and check how to improve this.

Thanks.

Thank you for your reply. I’m looking forward to improvement.

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