No module named 'cv2'出错

来源:互联网 发布:爱奇艺获取网站源码 编辑:程序博客网 时间:2024/06/16 03:46

当在python 3.6里运行课程里的强化学习程序时,出现如下出错,怎么办呢?

>>> 
= RESTART: D:\work\csdn\tensorflow\DeepLearningFlappyBird\deep_q_network.py =
Traceback (most recent call last):
  File "D:\work\csdn\tensorflow\DeepLearningFlappyBird\deep_q_network.py", line 8, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'


可以看到缺少cv2模块,这时就需要下载opencv模块,可以通过下面命令进行:

D:\AI\sample\tensorforce>pip install opencv-contrib-python


当安装完成之后,就可以了。

1. RPG游戏从入门到精通

http://edu.csdn.net/course/detail/5246

2. WiX安装工具的使用
http://edu.csdn.net/course/detail/5207

3. 俄罗斯方块游戏开发
http://edu.csdn.net/course/detail/5110
4. boost库入门基础
http://edu.csdn.net/course/detail/5029
5.Arduino入门基础
http://edu.csdn.net/course/detail/4931
6.Unity5.x游戏基础入门
http://edu.csdn.net/course/detail/4810
7. TensorFlow API攻略
http://edu.csdn.net/course/detail/4495
8. TensorFlow入门基本教程
http://edu.csdn.net/course/detail/4369
9. C++标准模板库从入门到精通 
http://edu.csdn.net/course/detail/3324
10.跟老菜鸟学C++
http://edu.csdn.net/course/detail/2901
11. 跟老菜鸟学python
http://edu.csdn.net/course/detail/2592
12. 在VC2015里学会使用tinyxml库
http://edu.csdn.net/course/detail/2590
13. 在Windows下SVN的版本管理与实战 
http://edu.csdn.net/course/detail/2579
14.Visual Studio 2015开发C++程序的基本使用 
http://edu.csdn.net/course/detail/2570
15.在VC2015里使用protobuf协议
http://edu.csdn.net/course/detail/2582
16.在VC2015里学会使用MySQL数据库
http://edu.csdn.net/course/detail/2672


原创粉丝点击