How to bind openalpr with python on a mac?

1.1k Views Asked by At

I recently installed openalpr on my mac using brew install openalpr with success. I would like to use the openalpr library with python 2.7 but I am having difficulty binding the two and could use some help.

I currently get the following in my projects file location:

Python 2.7.11 (default, Jan 22 2016, 08:29:18) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from openalpr import Alpr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named openalpr
>>> 

When I move to /usr/local/Cellar/openalpr/2.3.0/lib/python2.7/dist-packages/openalpr

The import works. How can I bind this library? Thanks

EDIT: I think I've seen that running the setup.py for openalpr is how you bind but I have no idea where to find it in my file system.

1

There are 1 best solutions below

0
On

I had to do the following command:

echo /usr/local/opt/openalpr/lib/python2.7/dist-packages/ >> /usr/local/lib/python2.7/site-packages/openalpr.pth