Skip to content
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

please help me, how can fix this in jupyter import cv2 ..................its work well in python but in jupyter not #918

Open
4 tasks
alirezahamd254 opened this issue Nov 24, 2023 · 3 comments

Comments

@alirezahamd254
Copy link

Expected behaviour

run cv2
Write here how did you expect the library to function.
cv2

Actual behaviour

Write here what went wrong.

Steps to reproduce

  • example code
  • operating system
  • architecture (e.g. x86)
  • opencv-python version
Issue submission checklist

(((((error : ~\anaconda3\lib\site-packages\cv2_init_.py in 179 180 --> 181 bootstrap() ~\anaconda3\lib\site-packages\cv2_init_.py in bootstrap() 173 174 for submodule in __collect_extra_submodules(DEBUG): --> 175 if _load_extra_py_code_for_module("cv2", submodule, DEBUG): 176 if DEBUG: print("Extra Python code for", submodule, "is loaded") 177 ~\anaconda3\lib\site-packages\cv2_init.py in _load_extra_py_code_for_module(base, name, enable_debug_print) 26 native_module = sys.modules.pop(module_name, None) 27 try: ---> 28 py_module = importlib.import_module(module_name) 29 except ImportError as err: 30 if enable_debug_print: ~\anaconda3\lib\importlib_init.py in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap.gcd_import(name[level:], package, level) 128 129 ~\anaconda3\lib\site-packages\cv2\typing_init.py in 67 68 if numpy.lib.NumpyVersion(numpy.version) > "1.20.0" and sys.version_info >= (3, 9): ---> 69 NumPyArrayGeneric = numpy.ndarray[typing.Any, numpy.dtype[numpy.generic]] 70 else: 71 NumPyArrayGeneric = numpy.ndarray TypeError: 'numpy._DTypeMeta' object is not subscriptable

  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python
@Avasam
Copy link

Avasam commented Nov 24, 2023

Look at pinned issue: #885

@alirezahamd254
Copy link
Author

Uploading Screenshot 2023-11-24 093143.png…

@PavloFesenko
Copy link

@alirezahamd254, have you tried updating your NumPy version? More information about the libraries in your environment would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants