Import OpenCV from python embedded in C ++ code #3392
Unanswered
jmmsalvadorVideologicanalytics
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to import a python OpenCV module from a C ++ source code with the python embedded
py::module_ cv2 = py::module_::import("cv2");
But when doing the import I got this error:
`ModuleNotFoundError: No module named 'cv2.cv2'
At:
C:\Users\develop\AppData\Local\Programs\Python\Python39\lib\site-packages\cv2_init_.py(5):
(241): _call_with_frames_removed
(883): exec_module
(703): _load_unlocked
(1006): _find_and_load_unlocked
(1027): _find_and_load
`
In python if I can do the import without problems
I installed pybind11 with vcpkg
How can I solve the problem?
Beta Was this translation helpful? Give feedback.
All reactions