Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'postal' #83

Open
bryan-yen opened this issue Sep 13, 2022 · 1 comment
Open

ModuleNotFoundError: No module named 'postal' #83

bryan-yen opened this issue Sep 13, 2022 · 1 comment

Comments

@bryan-yen
Copy link

bryan-yen commented Sep 13, 2022

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'

@damienburke
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants