Solve the problem "No module named 'cv2' " in python
来源:互联网 发布:58同城网络兼职日结 编辑:程序博客网 时间:2024/06/05 19:31
When I try to import 'cv2' in python, an error arise saying "No module named 'cv2'. I have encountered this problem several times and it's easy to solve it. You can install "opencv-contrib-python" module to solve it. Below are some official descriptions about this module.
Wrapper package for OpenCV python bindings.
Unofficial OpenCV packages for Python with contrib modules.
Note: the usage of opencv-contrib-python might be restricted in some countries since the contrib package contains somepatented algorithms/non-free modules.
If you are looking for a version without the contrib modules, please install opencv-python instead.
The packages contain pre-compiled OpenCV binary with Python bindings. This enables super fast (usually < 10 seconds) OpenCVinstallation for Python.
If you need only OpenCV Python bindings, no separate OpenCV installation is required.
IMPORTANT NOTE
MacOS and Linux wheels do not support video related functionality (not compiled with FFmpeg).
Installation and Usage
- If you have previous/other version of OpenCV installed (e.g. cv2 module in the root of Python’s site-packages), remove it before installation to avoid conflicts.
- To further avoid conflicts and to make development easier, Python’s virtual environments are highly recommended for development purposes.
- If you have an existing opencv-python installation, run pip uninstall opencv-python
- Install this package:
pip install opencv-contrib-python
- Import the package:
import cv2
- Solve the problem "No module named 'cv2' " in python
- Python Import Error: No module named cv2
- No module named cv2
- ImportError: No module named cv2
- ImportError: No module named cv2
- ImportError: No module named cv2
- ImportError: No module named cv2
- ImportError: No module named cv2
- ImportError: No module named cv2
- No module named 'cv2'出错
- cv2 安装 | ImportError: No module named cv2
- pycharm import cv2 : no module named cv2
- ImportError: No module named cv2 in ubuntu 16.04 Anaconda2
- ubuntu-openCV-python接口配置 ImportError : No module named cv2
- python导入opencv解决no module named cv2问题
- The error in python :ImportError: No module named xxx
- ImportError: No module named cv2 解决方法
- ImportError: No module named cv2 解决方法
- Java环境变量配置
- 如何做“人”?
- spring boot项目实战之工具篇(ognl)
- 文字长度可变跑马灯效果
- phi(大数质因数分解欧拉函数)
- Solve the problem "No module named 'cv2' " in python
- Markdown
- 关于rospy 中service的理解及例子程序
- HDU 4804 Campus Design 状压DP
- Java数据结构与算法
- Java构造方法
- hamming distance(汉明距离)
- Java:二叉树的递归遍历
- ACM ICPC 2017 Warmup Contest 4(ACM Northeastern European Regional Contest,Northern Subregion 2015)