在windows中使用python运行openalpr

在windows中使用python运行openalpr,python,openalpr,alpr,Python,Openalpr,Alpr,我创建了一个环境并使用pip install openalpr安装了openalpr,然后从下载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 O

我创建了一个环境并使用
pip install openalpr
安装了openalpr,然后从下载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", 'openalpr.conf', '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'
回溯(最近一次呼叫最后一次):
文件“C:\Users\Blaster\project\lib\site packages\openalpr\openalpr.py”,第70行,在\uuu init中__
self.\u openalprpy\u lib=ctypes.cdll.LoadLibrary(“libopenalpr.dll”)
LoadLibrary中第451行的文件“c:\python\python38\lib\ctypes\\uuuuu init\uuuuuu.py”
返回自我类型(名称)
文件“c:\python\python38\lib\ctypes\\ uuuuu init\ uuuu.py”,第373行,在\uuuu init中__
self.\u handle=\u dlopen(self.\u名称,模式)
FileNotFoundError:找不到模块“libopenalpr.dll”(或其依赖项之一)。尝试使用构造函数语法的完整路径。
上述异常是以下异常的直接原因:
回溯(最近一次呼叫最后一次):
文件“vidOpenALPR.py”,第5行,在
alpr=alpr(“eu”,“openalpr.conf”,“运行时数据”)
文件“C:\Users\Blaster\project\lib\site packages\openalpr\openalpr.py”,第80行,在\uuu init中__
提高nex
OSError:找不到OpenALPR库。请确保OpenALPR已正确安装在您的系统上,并且库位于适当的路径中。
在中忽略异常:
回溯(最近一次呼叫最后一次):
文件“C:\Users\Blaster\project\lib\site packages\openalpr\openalpr.py”,第159行,在__
文件“C:\Users\Blaster\project\lib\site packages\openalpr\openalpr.py”,第212行,已加载
AttributeError:“Alpr”对象没有“loaded”属性
请帮我解决这个问题