lanzani / jetson-docs

📖 Independent, centralized and community tested nvidia jetson documentation.
https://jetson-docs.com
MIT License
4 stars 0 forks source link

OpenCV versions Conflict #2

Closed bwajster closed 9 months ago

bwajster commented 9 months ago

Prior to following the steps on the link: https://jetson-docs.com/libraries/opencv/l4t32.7.1/py3.6.9 I had OpenCV 4.1.2 installed on my system with Cuda support. After implementing all the steps on the same link and after running the command opencv_version I get 4.8.0

But when I run python3 -c "import cv2; print(cv2.__version__)" or Step7 of the link above python3 -c "import cv2; print('OpenCV version:', str(cv2.__version__)); print(cv2.getBuildInformation())" I get OpenCV version: 4.1.2 and it's build details. I need to see OpenCV version as 4.8.0 after running the command python3 -c "import cv2; print('OpenCV version:', str(cv2.__version__)); print(cv2.getBuildInformation())" How do I do this?

Please refer to the image attached in my next comment.

Kindly pls help.

bwajster commented 9 months ago

opencv_conflict

Pls refer to this image.

bwajster commented 9 months ago

opencv_conflict1 opencv_conflict2

How do I make sure python3 uses OpenCV 4.8.0 and not 4.1.2 ?

lanzani commented 9 months ago

Hi! This means you are almost done, have you completed all the steps form https://jetson-docs.com/libraries/opencv/l4t32.7.1/py3.6.9#install-opencv-from-package?

From what I see, I suppose you missed step 5

lanzani commented 9 months ago

Update me if that solved your problem :)

bwajster commented 9 months ago

step5 I implemented step5. Hope it's correct, is the + sign needed at the start of the line?

lanzani commented 9 months ago

No, the "+" sign is not needed, try to remove it.

bwajster commented 9 months ago

Here's what I'm having an issue with: opencv_conflict1 opencv_conflict2

Python3 uses 4.1.2 and not 4.8.0 How do I ensure python3 uses 4.8.0?

lanzani commented 9 months ago

Run this command:

export PYTHONPATH=/usr/local/lib/python3.6/site-packages:$PYTHONPATH

And try again.

bwajster commented 9 months ago

Do i run the command export PYTHONPATH=/usr/local/lib/python3.6/site-packages:$PYTHONPATH on the terminal?

lanzani commented 9 months ago

yes

bwajster commented 9 months ago

python3 -c "import cv2; print(cv2.__version__)" returns 4.8.0

Thanks a ton.

lanzani commented 9 months ago

You are welcome, make sure you have removed the "+" sign from .bashrc and you are good to go :)

bwajster commented 9 months ago

Running sudo apt-get update && apt-get upgrade gives me this:

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Can I overlook/ignore them?

lanzani commented 9 months ago

Oh, sorry, I've missed a sudo. The correct command is:

sudo apt-get update && sudo apt-get upgrade
bwajster commented 9 months ago

Thank You.

bwajster commented 9 months ago

It's has been 3hours since I started installing MediaPipe 0.8.5 and I'm still at:

Building wheel for opencv-contrib-python (pyproject.toml):

What do I do?