ImportError: DLL load failed while importing cv2

文章讲述了作者遇到的问题,即Python程序在本地Win10运行正常但在WinServer2012R2上失败,原因在于缺少mfplat.dll,解决方法是安装WindowsDesktopExperience,确保MediaServices相关DLL可用。对于计划在云端部署的开发者,需注意选中DesktopExperience功能。
摘要由CSDN通过智能技术生成

最近同事扔了个python程序给web系统使用,本地的win10可以正常使用,部署到winserver2012r2上就扑街。

后面找了不少帖子,终于解决了,希望帮到有缘人。

Recently I have faced the similar issue in Azure Windows Server 2012 r2 . Tried all option with and without Anaconda but none of them helped. After lot of findings I found that mfplat.dll was missing which is related to Window Media Service.

Hence you have to manually install the features so that you can get dll related to window media service.

1.Turn windows features on or off

2.Skip the roles screen and directly go to Feature screen

3.Select "Desktop Experience" under "User Interfaces and Infrastructure"

After this all required dll of media services for opencv would be available.

So if you are planning to run your code in cloud(Window Server) then please dont forget to select Desktop Experience feature.

意思就是,给服务器装个“桌面体验服务”就解决了。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值