{"action":"created","issue":{"url":"https://api.github.com/repos/openvenues/pypostal/issues/13","repository_url":"https://api.github.com/repos/openvenues/pypostal","labels_url":"https://api.github.com/repos/openvenues/pypostal/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/openvenues/pypostal/issues/13/comments","events_url":"https://api.github.com/repos/openvenues/pypostal/issues/13/events","html_url":"https://github.com/openvenues/pypostal/issues/13","id":194720558,"number":13,"title":"fatal error: 'libpostal/libpostal.h' file not found","user":{"login":"nicolewhite","id":7498009,"avatar_url":"https://avatars.githubusercontent.com/u/7498009?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolewhite","html_url":"https://github.com/nicolewhite","followers_url":"https://api.github.com/users/nicolewhite/followers","following_url":"https://api.github.com/users/nicolewhite/following{/other_user}","gists_url":"https://api.github.com/users/nicolewhite/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolewhite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolewhite/subscriptions","organizations_url":"https://api.github.com/users/nicolewhite/orgs","repos_url":"https://api.github.com/users/nicolewhite/repos","events_url":"https://api.github.com/users/nicolewhite/events{/privacy}","received_events_url":"https://api.github.com/users/nicolewhite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-09T23:17:56Z","updated_at":"2016-12-10T00:10:51Z","closed_at":null,"body":"I followed the instructions and installed libpostal.\r\n\r\n```\r\ngit clone https://github.com/openvenues/libpostal\r\ncd libpostal\r\n./bootstrap.sh\r\nmkdir ~/libpostal-datadir\r\n./configure --datadir=~/libpostal-datadir\r\nmake\r\n```\r\n\r\nI ran into issues with language_classifier failing, but downloaded it manually with curl:\r\n\r\n```\r\ncurl http://libpostal.s3.amazonaws.com/language_classifier.tar.gz -o ~/libpostal-datadir/libpostal/language_classifier.tar.gz\r\ncd ~/libpostal-datadir/libpostal\r\ntar -xzf language_classifier.tar.gz\r\n```\r\n\r\nI'm able to use the library:\r\n\r\n```\r\n➜  libpostal git:(master) ✗ src/address_parser\r\nLoading models...\r\n\r\nWelcome to libpostal's address parser.\r\n\r\nType in any address to parse and print the result.\r\n\r\nSpecial commands:\r\n\r\n.language [code] to specify a language\r\n.country [code] to specify a country\r\n.exit to quit the program\r\n\r\n> 123 Main Street\r\n\r\nResult:\r\n\r\n{\r\n  \"house_number\": \"123\",\r\n  \"road\": \"main street\"\r\n}\r\n\r\n> \r\n```\r\n\r\nBut can't install the `pypostal` package:\r\n\r\n```\r\n(country-append) ➜  pypostal git:(master) pip install postal\r\nCollecting postal\r\n  Using cached postal-0.3.tar.gz\r\nRequirement already satisfied: six in /Users/nicole/.virtualenvs/country-append/lib/python2.7/site-packages (from postal)\r\nBuilding wheels for collected packages: postal\r\n  Running setup.py bdist_wheel for postal ... error\r\n  Complete output from command /Users/nicole/.virtualenvs/country-append/bin/python -u -c \"import setuptools, tokenize;__file__='/private/var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-build-AbquqQ/postal/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" bdist_wheel -d /var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/tmpF3t5tapip-wheel- --python-tag cp27:\r\n  running bdist_wheel\r\n  running build\r\n  running build_py\r\n  creating build\r\n  creating build/lib.macosx-10.12-intel-2.7\r\n  creating build/lib.macosx-10.12-intel-2.7/postal\r\n  copying postal/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n  copying postal/expand.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n  copying postal/parser.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n  creating build/lib.macosx-10.12-intel-2.7/postal/tests\r\n  copying postal/tests/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n  copying postal/tests/test_expand.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n  copying postal/tests/test_parser.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n  creating build/lib.macosx-10.12-intel-2.7/postal/utils\r\n  copying postal/utils/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n  copying postal/utils/encoding.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n  copying postal/utils/enum.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n  copying postal/utils/omitted.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n  running build_ext\r\n  building 'postal._expand' extension\r\n  creating build/temp.macosx-10.12-intel-2.7\r\n  creating build/temp.macosx-10.12-intel-2.7/postal\r\n  cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -arch i386 -arch x86_64 -pipe -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c postal/pyexpand.c -o build/temp.macosx-10.12-intel-2.7/postal/pyexpand.o -std=c99 -Wno-unused-function\r\n  postal/pyexpand.c:2:10: fatal error: 'libpostal/libpostal.h' file not found\r\n  #include <libpostal/libpostal.h>\r\n           ^\r\n  1 error generated.\r\n  error: command 'cc' failed with exit status 1\r\n  \r\n  ----------------------------------------\r\n  Failed building wheel for postal\r\n  Running setup.py clean for postal\r\nFailed to build postal\r\nInstalling collected packages: postal\r\n  Running setup.py install for postal ... error\r\n    Complete output from command /Users/nicole/.virtualenvs/country-append/bin/python -u -c \"import setuptools, tokenize;__file__='/private/var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-build-AbquqQ/postal/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record /var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-E3CTvr-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nicole/.virtualenvs/country-append/include/site/python2.7/postal:\r\n    running install\r\n    running build\r\n    running build_py\r\n    creating build\r\n    creating build/lib.macosx-10.12-intel-2.7\r\n    creating build/lib.macosx-10.12-intel-2.7/postal\r\n    copying postal/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n    copying postal/expand.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n    copying postal/parser.py -> build/lib.macosx-10.12-intel-2.7/postal\r\n    creating build/lib.macosx-10.12-intel-2.7/postal/tests\r\n    copying postal/tests/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n    copying postal/tests/test_expand.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n    copying postal/tests/test_parser.py -> build/lib.macosx-10.12-intel-2.7/postal/tests\r\n    creating build/lib.macosx-10.12-intel-2.7/postal/utils\r\n    copying postal/utils/__init__.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n    copying postal/utils/encoding.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n    copying postal/utils/enum.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n    copying postal/utils/omitted.py -> build/lib.macosx-10.12-intel-2.7/postal/utils\r\n    running build_ext\r\n    building 'postal._expand' extension\r\n    creating build/temp.macosx-10.12-intel-2.7\r\n    creating build/temp.macosx-10.12-intel-2.7/postal\r\n    cc -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -arch i386 -arch x86_64 -pipe -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c postal/pyexpand.c -o build/temp.macosx-10.12-intel-2.7/postal/pyexpand.o -std=c99 -Wno-unused-function\r\n    postal/pyexpand.c:2:10: fatal error: 'libpostal/libpostal.h' file not found\r\n    #include <libpostal/libpostal.h>\r\n             ^\r\n    1 error generated.\r\n    error: command 'cc' failed with exit status 1\r\n    \r\n    ----------------------------------------\r\nCommand \"/Users/nicole/.virtualenvs/country-append/bin/python -u -c \"import setuptools, tokenize;__file__='/private/var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-build-AbquqQ/postal/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record /var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-E3CTvr-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nicole/.virtualenvs/country-append/include/site/python2.7/postal\" failed with error code 1 in /private/var/folders/8f/_lk_kbrj49q3b317sp3b9y1c0000gn/T/pip-build-AbquqQ/postal/\r\n```\r\n\r\nI added the location of `libpostal.pc` to `PKG_CONFIG_PATH`:\r\n\r\n```\r\n(country-append) ➜  pypostal git:(master) echo $PKG_CONFIG_PATH \r\n/Users/nicole/GitHub/libpostal\r\n```\r\n\r\nHowever it still fails with the same error. I've also tried cloning this repository and installing with `python setup.py install` but get the same error. Any help is appreciated!"},"comment":{"url":"https://api.github.com/repos/openvenues/pypostal/issues/comments/266158165","html_url":"https://github.com/openvenues/pypostal/issues/13#issuecomment-266158165","issue_url":"https://api.github.com/repos/openvenues/pypostal/issues/13","id":266158165,"user":{"login":"thatdatabaseguy","id":238455,"avatar_url":"https://avatars.githubusercontent.com/u/238455?v=3","gravatar_id":"","url":"https://api.github.com/users/thatdatabaseguy","html_url":"https://github.com/thatdatabaseguy","followers_url":"https://api.github.com/users/thatdatabaseguy/followers","following_url":"https://api.github.com/users/thatdatabaseguy/following{/other_user}","gists_url":"https://api.github.com/users/thatdatabaseguy/gists{/gist_id}","starred_url":"https://api.github.com/users/thatdatabaseguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatdatabaseguy/subscriptions","organizations_url":"https://api.github.com/users/thatdatabaseguy/orgs","repos_url":"https://api.github.com/users/thatdatabaseguy/repos","events_url":"https://api.github.com/users/thatdatabaseguy/events{/privacy}","received_events_url":"https://api.github.com/users/thatdatabaseguy/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T00:10:51Z","updated_at":"2016-12-10T00:10:51Z","body":"Ok, so the script that downloads the various model files keeps track of the last version it downloaded in a few housekeeping files in the datadir.\r\n\r\nInstead of getting wrapped up in autoconf for this one, the script just does a quick test.  If you run the following:\r\n\r\n```shell\r\nif date -ur . >/dev/null 2>&1; then\r\n    echo \"have date\"\r\nelif stat -f %Sm . >/dev/null 2>&1; then\r\n    echo \"have stat\"\r\nfi;\r\n```\r\n\r\nDoes it print \"have date\"?"}}
{"actor":{"display_login":"thatdatabaseguy"}}