最近同事扔了个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.
意思就是,给服务器装个“桌面体验服务”就解决了。