Skip to content

Instantly share code, notes, and snippets.

@takurx
Created July 1, 2024 10:54
Show Gist options
  • Save takurx/fcccb31b8758c590f40c3d316f053fec to your computer and use it in GitHub Desktop.
Save takurx/fcccb31b8758c590f40c3d316f053fec to your computer and use it in GitHub Desktop.
windows, opencv

Log

C:\WINDOWS\system32>set OPENCV_DIR=F:\211220_nakagawa\opencv\opencv\build\bin;F:\211220_nakagawa\opencv\opencv\build\x64\vc16\bin
C:\WINDOWS\system32>set
.....
.....
OpenCV_DIR=F:\211220_nakagawa\opencv\opencv\build\bin;F:\211220_nakagawa\opencv\opencv\build\x64\vc16\bin
OS=Windows_NT
.....
.....
C:\WINDOWS\system32>where opencv_version
F:\211220_nakagawa\opencv\opencv\build\x64\vc16\bin\opencv_version.exe

C:\WINDOWS\system32>opencv_version
4.10.0

C:\WINDOWS\system32>python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun  6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import opencv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'opencv'
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
>>> pip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pip' is not defined. Did you mean: 'zip'?
>>> exit
Use exit() or Ctrl-Z plus Return to exit
>>> exit()

C:\WINDOWS\system32>pip

Usage:
  C:\Users\Admin\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe -m pip <command> [options]

Commands:
  install                     Install packages.
......
......
C:\WINDOWS\system32>pip install opencv-python
C:\WINDOWS\system32>python
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun  6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print(cv2.version)
<module 'cv2.version' from 'C:\\Users\\Admin\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python312\\site-packages\\cv2\\version.py'>
>>> print(cv2.__version__)
4.10.0
>>> exit()

C:\WINDOWS\system32>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment