anacoda下安装opencv库,在anaconda3中安装opencv

Hello guys i ve just installed anaconda3 in windows 8.1 and opencv 2.4.13 and 3.1.0/ Ive copied from the file c:/..../opencv/build/python/2.7/x64/cv2.pyd and i pasted it to C:\Users.....\Anaconda3\Lib\site-packages. I ve pasted both for opencv 2.4.13 as cv2.pyd and for opencv 3.1.0 as cv2(3)pyd in order to change it when i want to use any of them. My system is 64-bit and i use jupyter notebook. When i run the command import cv2 it write me

ImportError Traceback (most recent call last)

in ()

----> 1 import cv2

In anaconda3 i use python3.5

ImportError: DLL load failed: The specified module could not be found.

解决方案

I might be missing something, but i believe you are just missing seting up the envi. variables.

Set Enviromental Variables

Right-click on "My Computer" (or "This PC" on Windows 8.1) -> left-click Properties -> left-click "Advanced" tab -> left-click "Environment Variables..." button.

Add a new User Variable to point to the OpenCV (either x86 for 32-bit system or x64 for 64-bit system.) I am currently on a 64-bit machine.

| 32-bit or 64 bit machine? | Variable | Value |

|---------------------------|--------------|--------------------------------------|

| 32-bit | OPENCV_DIR | C:\opencv\build\x86\vc12 |

| 64-bit | OPENCV_DIR | C:\opencv\build\x64\vc12 |

Append %OPENCV_DIR%\bin to the User Variable PATH.

For example, my PATH user variable looks like this...

Before:

C:\Users\Johnny\Anaconda;C:\Users\Johnny\Anaconda\Scripts

After:

C:\Users\Johnny\Anaconda;C:\Users\Johnny\Anaconda\Scripts;%OPENCV_DIR%\bin

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值