Python Forum

Full Version: Address Parser (Internationnal)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

I am looking for a library which can parse postal's addresses. I 've found one named libpostal but I don't know how to install and use with Python.


Thank you for you're help.
libpostal is a C library, but Python bindings exist: https://github.com/openvenues/pypostal.
(Aug-02-2021, 11:44 AM)ndc85430 Wrote: [ -> ]libpostal is a C library, but Python bindings exist: https://github.com/openvenues/pypostal.

Thank your for your answer.

Unfortunatelly, I can't use the library because I don't kwow what I need to install.

I am not familiar to use github.
I would be grateful, if you would explain me how to install this library and all I need to use it.

Thank you
The readme there tells you what you need to do: install the C library as appropriate for your operating system. Then, install the Python library using pip.

You'll have to look at the link for documentation on how to use the library.
Thank you.

I have a Windows system

Did I need to install GIT because I don't know how to run this command for installing the C library ?

git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]
make
sudo make install

I try to run in Windows command but I think i need to install GIT before.
The docs on that page say you need to install Msys2 and MinGW. Did you already do that? Do those packages include Git perhaps?
Did you try installing the package using pip?
Per the Python library's README (see GitHub above):

Quote:Before using the Python bindings, you must install the libpostal C library.
(Aug-02-2021, 02:30 PM)ndc85430 Wrote: [ -> ]The docs on that page say you need to install Msys2 and MinGW. Did you already do that? Do those packages include Git perhaps?

I have installed Msys2 and running the command to install the C library.

To be honnest, I don't know what I am doing and I don't know if the install was done.

At the end i have this lines

 
configure: error: expected an absolute directory name for --datadir: [...some
make: *** No targets specified and no makefile found.  Stop.
bash: sudo: command not found
I have just copied exactly this code on the Msys2 command

git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure --datadir=[...some dir with a few GB of space...]
make
sudo make install
Thank you for your patience
1. You need to replace "[...some dir with a few GB of space...]" with an actual directory. Think! You might not know what the commands do, but the text should prompt some thinking.
2. Why are you trying to use sudo when the instructions for Windows explicitly do not?
Pages: 1 2