ModuleNotFoundError:没有名为“ cv2”的模块

时间:2019-03-29 09:25:43

标签: python windows opencv pycharm

这是Python尝试运行代码时给我的错误。尽管已安装所有依赖项,但找不到cv2插件。

我尝试了Python 3.6和3.7、32和64位版本。我试图通过anaconda。但是没有任何帮助。

import cv2

I try to run code to recognize objects, but I get errors: pydev debugger:
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1741, in <module>
    main()
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1735, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1135, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:/Users/open_/PycharmProjects/firstAI/venv/main.py", line 1, in <module>
    from imageai.Detection import ObjectDetection
  File "C:\Users\open_\firstAI\lib\site-packages\imageai\Detection\__init__.py", line 1, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

enter image description here

0 个答案:

没有答案