-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
YOLOv5 Example - No module named 'cv2' #91
Comments
When I've run into this, it has been because a different Python is being executed than what I expected.
|
Thank you, Edward. The issue arose because, even though my Python interpreter in my IDE and my Python version in my terminal were at the same level, a different Python version was introduced into the bin directory after building. I suspect the problem lies with CMake, which is currently configured with that specific Python version. Do you have insights on how I can adjust this configuration to ensure the use of the correct Python version after the Lingua Franca build operation? Thank you very much, |
I'm not sure, but maybe @cmnrd can give us a clue. The PR that introduced the code that generates the shell script (which chooses the Python version) is this one: https://github.com/lf-lang/lingua-franca/pull/1914/files. This uses a mysterious variable This page on CMake might be helpful: https://cmake.org/cmake/help/latest/module/FindPython.html . |
Edward, your support is greatly appreciated. Thank you. |
I am not sure if these variables can be set as environment variables, or whether they need to be set within cmake (or be passed to it). Perhaps we could expose some of the hints in the target properties, but this might make Python programs less portable.
|
Hello,
I've been working on practicing with Lingua France while attempting to execute the Python YOLOv5 example. I've made sure to install all the required dependencies as suggested, and I've double-checked them. However, when I run the code, I still encounter an error in the terminal:
from cv2 import cv2 ModuleNotFoundError: No module named 'cv2'.
I'm wondering if I might be missing something in the library import. Could someone please assist me with this? Any help would be greatly appreciated.
Regards,
Vincenzo
The text was updated successfully, but these errors were encountered: