openvenues / pypostal

Python bindings to libpostal for fast international address parsing/normalization
MIT License
766 stars 88 forks source link

building 'postal._expand' extension error #55

Open yunier-rojas opened 4 years ago

yunier-rojas commented 4 years ago

Hi. I'm trying to install pypostal on a alpine OS. libpostal was successfully compiled but I get this error doing: pip install "postal==1.1.8"

The output of the command:

    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/postal
    copying postal/expand.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/token_types.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/dedupe.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/normalize.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/tokenize.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/near_dupe.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/__init__.py -> build/lib.linux-x86_64-3.6/postal
    copying postal/parser.py -> build/lib.linux-x86_64-3.6/postal
    creating build/lib.linux-x86_64-3.6/postal/tests
    copying postal/tests/test_parser.py -> build/lib.linux-x86_64-3.6/postal/tests
    copying postal/tests/test_expand.py -> build/lib.linux-x86_64-3.6/postal/tests
    copying postal/tests/_test_near_dupes.py -> build/lib.linux-x86_64-3.6/postal/tests
    copying postal/tests/__init__.py -> build/lib.linux-x86_64-3.6/postal/tests
    creating build/lib.linux-x86_64-3.6/postal/utils
    copying postal/utils/encoding.py -> build/lib.linux-x86_64-3.6/postal/utils
    copying postal/utils/enum.py -> build/lib.linux-x86_64-3.6/postal/utils
    copying postal/utils/omitted.py -> build/lib.linux-x86_64-3.6/postal/utils
    copying postal/utils/__init__.py -> build/lib.linux-x86_64-3.6/postal/utils
    copying postal/pyutils.h -> build/lib.linux-x86_64-3.6/postal
    running build_ext
    building 'postal._expand' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/postal
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include -I/usr/local/include/python3.6m -c postal/pyexpand.c -o build/temp.linux-x86_64-3.6/postal/pyexpand.o -std=c99
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

Any ideas?

do-you-dare commented 4 years ago

It seems you don't have gcc available. Maybe you are removing the compiler before running the pip install? Or maybe a path problem?

ThePrefixCyber commented 4 years ago

I'm having the same issue. My gcc seems to work normally for other installs. Working on Ubuntu 18