海康工业相机 Could not find module MvCameraControl.dll(已解决)

该文章已生成可运行项目,
(hik) D:\pythonProject\pachong\MVS_test\BasicDemo>python BasicDemo.py
Traceback (most recent call last):
  File "BasicDemo.py", line 4, in <module>
    from CamOperation_class import CameraOperation
  File "D:\pythonProject\pachong\MVS_test\BasicDemo\CamOperation_class.py", line 13, in <module>
    from MvCameraControl_class import *
  File "../MvImport\MvCameraControl_class.py", line 56, in <module>
    MvCamCtrldll = WinDLL(dll_path, winmode=0)
  File "C:\Users\Administrator\.conda\envs\hik\lib\ctypes\__init__.py", line 369, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Program Files (x86)\Common Files\MVS\Runtime\Win64_x64\MvCameraControl.dll'. Try using the full path with constructor syntax.

解决

# Python3.8版本修改Dll加载策略, 默认不再搜索Path环境变量, 同时增加winmode参数以兼容旧版本
# dllname = "MvCameraControl.dll"
# MvCamCtrldll = WinDLL("C:\\Program Files (x86)\\Co
本文章已经生成可运行项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值