如何解决在 windows
我创建了一个环境并使用 pip install openalpr
安装了 openalpr,然后从 https://github.com/openalpr/openalpr/releases 下载了 openalpr 并使用命令 python setup.py install
安装了 python 绑定
我尝试运行的代码是:
from openalpr import Alpr
alpr = Alpr("eu",'openalpr.conf','runtime_data')
if not alpr.is_loaded():
print("Error loading OpenALPR")
sys.exit(1)
alpr.set_top_n(1)
alpr.set_default_region("eu")
我收到如下错误
Traceback (most recent call last):
File "C:\Users\Blaster\project\lib\site-packages\openalpr\openalpr.py",line 70,in __init__
self._openalprpy_lib = ctypes.cdll.LoadLibrary("libopenalpr.dll")
File "c:\python\python38\lib\ctypes\__init__.py",line 451,in LoadLibrary
return self._dlltype(name)
File "c:\python\python38\lib\ctypes\__init__.py",line 373,in __init__
self._handle = _dlopen(self._name,mode)
FileNotFoundError: Could not find module 'libopenalpr.dll' (or one of its dependencies). Try using the full path with constructor syntax.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "vidOpenALPR.py",line 5,in <module>
alpr = Alpr("eu",'runtime_data')
File "C:\Users\Blaster\project\lib\site-packages\openalpr\openalpr.py",line 80,in __init__
raise nex
OSError: Unable to locate the OpenALPR library. Please make sure that OpenALPR is properly installed on your system and that the libraries are in the appropriate paths.
Exception ignored in: <function Alpr.__del__ at 0x0000026F50D28DC0>
Traceback (most recent call last):
File "C:\Users\Blaster\project\lib\site-packages\openalpr\openalpr.py",line 159,in __del__
File "C:\Users\Blaster\project\lib\site-packages\openalpr\openalpr.py",line 212,in is_loaded
AttributeError: 'Alpr' object has no attribute 'loaded'
请帮我解决这个问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。