我想使用pyueye模块来操纵我的IDS相机。我已经从制造商的网站上安装了最新的驱动程序,并且可以使用uEye Cockpit应用程序管理相机。我想写一些与相机一起使用的python脚本,但是我什至无法导入pyueye模块。
我的代码:
import ctypes
from pyueye import ueye
print(ueye.__version__)
错误信息:
C:\Python\python.exe C:/Users/Karol/PycharmProjects/ids_camera/ids_test.py
Traceback (most recent call last):
File "C:\Python\lib\site-packages\pyueye\dll.py", line 165, in load_dll
dll = DLL(libinfo, libnames, os.getenv(envname))
File "C:\Python\lib\site-packages\pyueye\dll.py", line 96, in __init__
raise RuntimeError("could not find any library for {} ({})".format(libinfo,
dllmsg))
RuntimeError: could not find any library for ueye_api (DLL_PATH: unset)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
\File "C:/Users/Karol/PycharmProjects/ids_camera/ids_test.py", line 2, in
<module>
from pyueye import ueye
File "C:\Python\lib\site-packages\pyueye\__init__.py", line 55, in <module>
from . import ueye
File "C:\Python\lib\site-packages\pyueye\ueye.py", line 54, in <module>
get_dll_file, _bind = load_dll("ueye_api", ["ueye_api_64", "ueye_api"],
"PYUEYE_DLL_PATH")
File "C:\Python\lib\site-packages\pyueye\dll.py", line 167, in load_dll
raise ImportError(exc)
ImportError: could not find any library for ueye_api (DLL_PATH: unset)
Process finished with exit code 1
我已经通过pip安装了该模块,我的操作系统是Win 7 x64,我的python解释器是3.6,与ueye关联的* .dll文件也安装在C:\ Windows ...文件夹中。我也将ueye_api.dll和ueye_tools.dll文件复制到了pyueye目录,但这没有帮助。
答案 0 :(得分:0)
我尝试将ueye_api_64.dll
中的C:\Program Files\IDS\uEye\USB driver package
添加到我的pyueye
文件夹中。我还将此位置添加到系统变量的PATH中,这为我解决了问题。
答案 1 :(得分:0)
尝试以下操作:
如果没有任何帮助,请与IDS支持人员联系。