Problem on running my code on xavier

Hi

I have a problem on running my code on xavier jetson nvidia . I tried the same code on jetson nano and it is working fine but not on xavier

Herein the error

vidia@jetson-0420219006982:~/Desktop/Thermal-Dataset-Social-Distancing-and-Mapping/Social-Distancing-AI$ python3 main.py
Traceback (most recent call last):
File “main.py”, line 24, in
import cv2
ModuleNotFoundError: No module named ‘cv2’

I installed opencv python by these codes

pip3 install opencv-python
pip3 install opencv-contrib-python

but no success

here in pip3 list

nvidia@jetson-0420219006982:~/Desktop/Thermal-Dataset-Social-Distancing-and-Mapping/
Social-Distancing-AI$ pip3 list
Package Version

absl-py 0.9.0
apturl 0.5.2
asn1crypto 0.24.0
astor 0.8.1
beautifulsoup4 4.6.0
blinker 1.4
Brlapi 0.6.6
certifi 2018.1.18
chardet 3.0.4
cryptography 2.1.4
cupshelpers 1.0
cycler 0.10.0
decorator 4.1.2
defer 1.0.6
distro 1.5.0
distro-info 0.18ubuntu0.18.04.1
feedparser 5.2.1
future 0.17.1
gast 0.3.3
google-pasta 0.2.0
graphsurgeon 0.4.1
grpcio 1.27.2
h5py 2.10.0
html5lib 0.999999999
httplib2 0.9.2
idna 2.6
Keras 2.2.4
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
keyring 10.6.0
keyrings.alt 3.0
kiwisolver 1.1.0
language-selector 0.1
launchpadlib 1.10.6
lazr.restfulclient 0.13.5
lazr.uri 1.0.3
louis 3.5.0
lxml 4.2.1
macaroonbakery 1.1.3
Mako 1.0.7
Markdown 3.2.1
MarkupSafe 1.0
mock 4.0.2
natsort 7.0.1
nose 1.3.7
nose-parameterized 0.3.4
numpy 1.19.5
oauth 1.0.1
oauthlib 2.0.6
olefile 0.45.1
opencv-contrib-python 4.5.3.56
opencv-python 3.4.15.55
opt-einsum 3.2.0
packaging 21.0
pbr 5.4.4
pexpect 4.2.1
Pillow 5.1.0
pip 21.1.3
portpicker 1.3.1
protobuf 3.11.3
psutil 5.7.0
py-cpuinfo 5.0.0
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pydot 1.2.3
pygobject 3.26.1
PyJWT 1.5.3
pymacaroons 0.13.0
PyNaCl 1.1.2
pyparsing 2.2.0
pyRFC3339 1.0
python-apt 1.6.5+ubuntu0.6
python-dateutil 2.8.1
python-debian 0.1.32
pytz 2018.3
pyxdg 0.25
PyYAML 3.12
reportlab 3.4.0
requests 2.23.0
requests-unixsocket 0.1.5
scikit-build 0.11.1
scipy 0.19.1
SecretStorage 2.3.1
setuptools 46.1.1
simplejson 3.13.2
six 1.14.0
ssh-import-id 5.7
system-service 0.3
systemd-python 234
tensorboard 1.12.2
tensorflow-estimator 1.15.1
tensorflow-gpu 1.13.0rc0+nv19.2
tensorrt 6.0.1.10
termcolor 1.1.0
testresources 2.0.1
Theano 0.9.0
ubuntu-drivers-common 0.0.0
uff 0.6.5
unattended-upgrades 0.1
unity-scope-calculator 0.1
unity-scope-chromiumbookmarks 0.1
unity-scope-colourlovers 0.1
unity-scope-devhelp 0.1
unity-scope-firefoxbookmarks 0.1
unity-scope-manpages 0.1
unity-scope-openclipart 0.1
unity-scope-texdoc 0.1
unity-scope-tomboy 0.1
unity-scope-virtualbox 0.1
unity-scope-yelp 0.1
unity-scope-zotero 0.1
urllib3 1.22
wadllib 1.3.2
webencodings 0.5
Werkzeug 1.0.0
wheel 0.30.0
wrapt 1.12.1
xkit 0.0.0
zope.interface 4.3.2

Looking for support

Hi,

OpenCV is pre-installed in the recent JetPack.

It seems that you are still using JetPack4.3 on Xavier.
Please reflash it to the latest JetPack (v4.5.1) and try it again.

Thanks.

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