openvenues / libpostal

A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.
MIT License
3.99k stars 414 forks source link

Build/install on Mac OSX with NO sudo access #621

Open Six0Six0 opened 1 year ago

Six0Six0 commented 1 year ago

Hi!

Two questions:

  1. Is there a way to make install and specify a target directory for libpostal installation? I don't have sudo access on the Mac.
  2. Can I create a python package and pip install it using above target directory?
2e0byo commented 10 months ago

Re. 2: the python package just needs to be able to find the library. If ldconfig -p | grep -i postal shows the library, you're good. You might be able to get away with just doing export LD_LIBRARY_PATH:/path/to/built/libpostal:$LD_LIBRARYPATH and skipping the install entirely.

Note that if you don't modify your LD_LIBRARY_PATH (or whatever else mac might call it) persistently, you'll have to set that env var every time you want to use the python library.