Giter VIP home page Giter VIP logo

Comments (7)

Ata1362 avatar Ata1362 commented on May 29, 2024

hi guys,
I followed the instruction and codes worked just perfect.
I have python 2 and 3 both installed on my Jetson tx2 and they are working fine.
after installing the OpenCV the CV2 is only can be import in Python2 NOT 3.
How can I make python3 to recognize or find the LIB files.
I tried to find the files and maybe copy them to the same directory for python3 but I could not find files.
BTW I have installed the opencv all in default directories.
Kindly please advise.
thank you.

from buildopencvtx2.

Ata1362 avatar Ata1362 commented on May 29, 2024

I found the files and libs installed on my Jetson.
btw, I'm still looking forward to find out how can make python3 to recognize CV2

from buildopencvtx2.

majiang2018 avatar majiang2018 commented on May 29, 2024

i think,you can copy file to

$ sudo cp /usr/local/lib/python3.5/site-packages/cv2.cpython-35m-aarch64-linux-gnu.so /usr/local/lib/python3.5/dist-packages/cv2.so

$ ls /usr/local/lib/python3.5/dist-packages/cv2.*
/usr/local/lib/python3.5/dist-packages/cv2.cpython-35m-aarch64-linux-gnu.so
$ ls /usr/local/lib/python2.7/dist-packages/cv2.*
/use/local/lib/python2.7/dist-packages/cv2.so
$ python3 -c 'import cv2; print(cv2.version)'
3.4.1-dev
$ python2 -c 'import cv2; print(cv2.version)'
3.4.1-dev

from buildopencvtx2.

majiang2018 avatar majiang2018 commented on May 29, 2024

https://jkjung-avt.github.io/opencv3-on-tx2/

from buildopencvtx2.

majiang2018 avatar majiang2018 commented on May 29, 2024

you need use nvidia sdkmanage update os to ubuntu18.04

update ./buidOpenCVTX2.sh file

OPENCV_VERSION=4.2.0

time cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-D WITH_CUDA=ON
-D CUDA_ARCH_BIN=${ARCH_BIN}
-D CUDA_ARCH_PTX=""
-D ENABLE_FAST_MATH=ON
-D CUDA_FAST_MATH=ON
-D WITH_CUBLAS=ON
-D WITH_LIBV4L=ON
-D WITH_GSTREAMER=ON
-D WITH_GSTREAMER_0_10=OFF
-D WITH_QT=ON
-D WITH_OPENGL=ON
-D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/opencv_contrib/modules
-D CUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so.8.0.0
-D CUDNN_VERSION='8.0'
../

from buildopencvtx2.

Ata1362 avatar Ata1362 commented on May 29, 2024

Thank you for answering my question. I appreciate it a lot.
I have removed my Python2, and nowadays, I only use python3, and works just perfect.
I hope that your answer will help those that are still having two pythons on their system.

from buildopencvtx2.

berkantay avatar berkantay commented on May 29, 2024

Hello @Ata1362 did @majiang2018 's solution work for opencv_contrib?

from buildopencvtx2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.