Error with OpenCV module (Computer Vision)
11 posts
• Page 1 of 2 • 1, 2
Error with OpenCV module (Computer Vision)
Hello everyone,
I am trying the new Gtuner release with Computer Vision but I am running into an issue. So far I have been able to install python.dll fine but it appears the OpenCV is not working at all.
I installed OpenCV trough pip install I installed OpenCV with the following command "pip install target=D:\Gtuner\_Python opencv-python" as you can see on this image I was able to install OpenCV on that directory.
However, on GtunerIV it shows that OpenCV is not recognized. You can see it in the following image.
Is there something I am missing?
Thanks in advance for the help.
I am trying the new Gtuner release with Computer Vision but I am running into an issue. So far I have been able to install python.dll fine but it appears the OpenCV is not working at all.
I installed OpenCV trough pip install I installed OpenCV with the following command "pip install target=D:\Gtuner\_Python opencv-python" as you can see on this image I was able to install OpenCV on that directory.
However, on GtunerIV it shows that OpenCV is not recognized. You can see it in the following image.
Is there something I am missing?
Thanks in advance for the help.
-
Ketechi - Staff Sergeant
- Posts: 13
- Joined: Thu Feb 22, 2018 8:13 pm
Re: Error with OpenCV module (Computer Vision)
For me the opencv path is like this:
C:\Users\username\AppData\Local\Programs\Python\Python38\Lib\site-packages
The file is here: C:\Users\username\AppData\Local\Programs\Python\Python38\Lib\site-packages\cv2\cv2.cp38-win_amd64.pyd
Not sure if GTuner or python needs the opencv to be in Lib\site-packages ? Maybe try to add that cv2 path to your PATH env ?
C:\Users\username\AppData\Local\Programs\Python\Python38\Lib\site-packages
The file is here: C:\Users\username\AppData\Local\Programs\Python\Python38\Lib\site-packages\cv2\cv2.cp38-win_amd64.pyd
Not sure if GTuner or python needs the opencv to be in Lib\site-packages ? Maybe try to add that cv2 path to your PATH env ?
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Error with OpenCV module (Computer Vision)
Scachi wrote:Not sure if GTuner or python needs the opencv to be in Lib\site-packages ?
Correct, Gtuner expects the default Python directory structure (Lib and Lib\site-packages).
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Error with OpenCV module (Computer Vision)
Thanks, I was able to make it work. I followed the advice and installed pip on "C:\Users\ME\AppData\Local\Programs\Python\Python37\Lib\site-packages".
Now OpenCV is being recognized.
In case it helps anyone what I had to do when installing OpenCV and Win32Api was the following:
For OpenCV: pip install --target=C:\Users\[your username]\AppData\Local\Programs\Python\Python[your version of python]\Lib\site-packages opencv-python
For Win32Api: pip install --target=C:\Users\[your username]\AppData\Local\Programs\Python\Python[your version of python]\Lib\site-packages pywin32
Now OpenCV is being recognized.
In case it helps anyone what I had to do when installing OpenCV and Win32Api was the following:
For OpenCV: pip install --target=C:\Users\[your username]\AppData\Local\Programs\Python\Python[your version of python]\Lib\site-packages opencv-python
For Win32Api: pip install --target=C:\Users\[your username]\AppData\Local\Programs\Python\Python[your version of python]\Lib\site-packages pywin32
-
Ketechi - Staff Sergeant
- Posts: 13
- Joined: Thu Feb 22, 2018 8:13 pm
Re: Error with OpenCV module (Computer Vision)
Glad you got working and thank you for sharing your findings.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Error with OpenCV module (Computer Vision)
I fixed the issue of my cv2 not being recognized but now I am encountering a new issue when just trying to do a visual input check:
GCV Error: _win_os_check()
File "C:\Users\garri\AppData\Local\Programs\Python\Python38\Lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\garri\\AppData\\Local\\Programs\\Python\\Python38\\Lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
numpy.core.multiarray failed to import
Please help! I have tried Python 3.8 and 3.9. Thanks
GCV Error: _win_os_check()
File "C:\Users\garri\AppData\Local\Programs\Python\Python38\Lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\garri\\AppData\\Local\\Programs\\Python\\Python38\\Lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
numpy.core.multiarray failed to import
Please help! I have tried Python 3.8 and 3.9. Thanks
-
GarrisonXV - Sergeant
- Posts: 9
- Joined: Wed Nov 11, 2020 1:03 am
Re: Error with OpenCV module (Computer Vision)
The solution is first remove your current numpy install and use numpy 1.18.1
- Code: Select all
pip install numpy==1.18.1
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Error with OpenCV module (Computer Vision)
J2Kbr wrote:The solution is first remove your current numpy install and use numpy 1.18.1
- Code: Select all
pip install numpy==1.18.1
You are a life saver, thank you!
Here is the terminal command if anyone needs it:
python -m pip install --target=C:\Users\[Username]\AppData\Local\Programs\Python\Python[Version]\Lib\site-packages numpy==1.18.1 --upgrade
example:
python -m pip install --target=C:\Users\myUsername\AppData\Local\Programs\Python\Python38\Lib\site-packages numpy==1.18.1 --upgrade
or if you are in a python ide then its just
pip install --target=C:\Users\myUsername\AppData\Local\Programs\Python\Python38\Lib\site-packages numpy==1.18.1 --upgrade
-
GarrisonXV - Sergeant
- Posts: 9
- Joined: Wed Nov 11, 2020 1:03 am
Re: Error with OpenCV module (Computer Vision)
GarrisonXV wrote:J2Kbr wrote:The solution is first remove your current numpy install and use numpy 1.18.1
- Code: Select all
pip install numpy==1.18.1
You are a life saver, thank you!
Here is the terminal command if anyone needs it:
python -m pip install --target=C:\Users\[Username]\AppData\Local\Programs\Python\Python[Version]\Lib\site-packages numpy==1.18.1 --upgrade
example:
python -m pip install --target=C:\Users\myUsername\AppData\Local\Programs\Python\Python38\Lib\site-packages numpy==1.18.1 --upgrade
or if you are in a python ide then its just
pip install --target=C:\Users\myUsername\AppData\Local\Programs\Python\Python38\Lib\site-packages numpy==1.18.1 --upgrade
Hello guys
I have this issue right now and do not understand what numpy and how to uninstall nor upgrade it, could you please explain in plain for a not so hi tech person here please
thanks
-
boxerpram - Sergeant First Class
- Posts: 25
- Joined: Sun Nov 08, 2020 8:28 am
Re: Error with OpenCV module (Computer Vision)
boxerpram wrote:Hello guys
I have this issue right now and do not understand what numpy and how to uninstall nor upgrade it, could you please explain in plain for a not so hi tech person here please
thanks
Video: https://ufile.io/ff9ywt1q
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 116 guests