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

ImportError: DLL load failed while importing _parser: The specified module could not be found #73

Open
lukeoz opened this issue Aug 9, 2021 · 1 comment

Comments

@lukeoz
Copy link

lukeoz commented Aug 9, 2021

After chipping away and finally being able to install the postal package on my Windows installation of Python, many thanks to this thread, I have come unstuck when trying to run an example script, specifically this:

from postal.parser import parse_address
parse_address('The Book Club 100-106 Leonard St Shoreditch London EC2A 4RH, United Kingdom')

It returns an error saying:

PS C:\Users\lukeoz> & python c:/Users/Me/AppData/Roaming/Python/Python39/site-packages/postal/tmp.py
Traceback (most recent call last):
  File "c:\Users\lukeoz\AppData\Roaming\Python\Python39\site-packages\postal\tmp.py", line 1, in <module>
    from postal.parser import parse_address
  File "C:\Users\lukeoz\AppData\Roaming\Python\Python39\site-packages\postal\parser.py", line 2, in <module>
    from postal import _parser
ImportError: DLL load failed while importing _parser: The specified module could not be found.

Is it trying to load the libpostal.dll file that was saved in C:\libpostal when I installed the C package? I have added C:\libpostal to my Path in my environment variables, but with no change to the outcome.

The same error happens while trying to import _expand as well.

Has anyone had this error before or recognises what the problem might be?

Many thanks in advance

@rhartopBBK
Copy link

rhartopBBK commented Aug 22, 2021

Am also having this issue. Found a work around by manually copying the dll in the mysys folder and pasting into the postal package as libpostal.dll.
Was probably caused by not running:
copy src.libs\libpostal-1.dll "C:\Users\Redmond.Hartop\AppData\Local\Programs\Python\Python39\Lib\site-packages\postal\libpostal.dll"
...after the postal install.

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