pypostal icon indicating copy to clipboard operation
pypostal copied to clipboard

ModuleNotFoundError: No module named 'postal'

Open bryan-yen opened this issue 2 years ago • 1 comments

Hi,

I'm trying to set this up to be callable through an apache server on an ubuntu box. I followed the instructions and got everything installed. It seems to work fine when calling the script from Terminal. However, I get the following error in the apache logs when I make a call to apache to execute the script. I believe it might be some pathing issue. Any ideas will be appreciated.

File "/var/www/html/cgi-bin/get_parsedAddress.py", line 5, in from postal.parser import parse_address ModuleNotFoundError: No module named 'postal'

bryan-yen avatar Sep 13 '22 23:09 bryan-yen

in case it helps others... i noticed i got this when i omitted sudo from sudo make install. Just ensure that after u install the c lib, u see successful logging like:

address_parser/ address_parser/address_parser_crf.dat address_parser/address_parser_phrases.dat address_parser/address_parser_postal_codes.dat address_parser/address_parser_vocab.trie Checking for new libpostal language classifier data file... .... make[2]: Leaving directory '/tmp/libpostal/test' make[2]: Entering directory '/tmp/libpostal' make[2]: Leaving directory '/tmp/libpostal' make[1]: Leaving directory '/tmp/libpostal'

damienburke avatar Apr 23 '24 19:04 damienburke