-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build only for python2 #6
Comments
When I use :
I get: Extra modules: Platform: CPU/HW features: C/C++: OpenCV modules: GUI: Media I/O: Video I/O: Parallel framework: TBB (ver 2020.2 interface 11102) Trace: YES (with Intel ITT) Other third-party libraries: NVIDIA CUDA: YES (ver 10.2, CUFFT CUBLAS FAST_MATH) cuDNN: YES (ver 8.0.0) Python 2: Python 3: Python (for build): /usr/bin/python2.7 Java: Install to: /usrwhen I use: I get:` Platform: CPU/HW features: C/C++: OpenCV modules: GUI: Media I/O: Video I/O: Parallel framework: pthreads Trace: YES (with Intel ITT) Other third-party libraries: OpenCL: YES (no extra features) Python 3: Python (for build): /bin/python2.7 Java: Install to: /tmp/pip-req-build-zuuo394f/_skbuild/linux-aarch64-3.6/cmake-install |
Your original Python 3 OpenCV installation is overwritten by some other software package. That package uses also OpenCV and has the requirement in its wheel. You can see this in the last line, it is some pip-req-build, not something initiated by the script. Second, the locations are also different, as the OpenCV library itself ( |
I'm sorry but I did not quite understand your answer, I don't see the build folder. |
First option. Second option,
Test is you can run OpenCV in python 3. If everything is removed, you should not. That's good. |
I have too many software on my Nano so the first option its problem about the second option I try to remove the last part but I don't have this path on my Jetson for example if I use: |
maybe I can try to build again and specify the path for python3 in the .sh file? |
The weirdest thing I see, When I am in the directory |
It has all to do with way Python loads its libraries. And in which order. You can run We must remove the link to the wrong OpenCV version.
It gives you the OpenCV library python is currently using. |
Ok so I remove the wrong path but now I don't recognize OpenCV how I can make that is recognized OpenCV from the correct path? how can I link the correct path with OpenCV? |
Try |
Unfortunately it does not work, still when I run python not from the path |
There are still some residues left from your previous OpenCV installation. |
Ok, I install libgdal-dev but still the same problem. |
Sorry, it becomes harder and harder to solve something like this on a distance. Most answers i found in this tutorial https://realpython.com/python-import/ |
Hi everyone! I have the same problem that opencv 4.5.0 was proper installed only for python 2. How @Qengineering wrote, the reason of that is python not proper resolve order loads of library. In my case i fixed it like that: sudo mv /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so.backup
sudo ln -s /usr/lib/python3.6/dist-packages/cv2/python-3.6/cv2.cpython-36m-aarch64-linux-gnu.so /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so where: |
Hi, I use
./OpenCV-4-5-1.sh
and it's successful.Unfortunately, it's built on my Jetson Nano only for python2 and I want to use python3 I don't understand why?
I would happy how can I build OpenCV with Cuda on python3?
The text was updated successfully, but these errors were encountered: