-
Notifications
You must be signed in to change notification settings - Fork 89
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
Installation/Usage unclear #8
Comments
That sounds import path related. Did you just run pip install, or did you clone the repo first? If you cloned the repo, ran pip install, then try to import from the same checkout directory, Python's going to try to import first from the local package rather than the installed version in site-packages (and the local package hasn't compiled the C libs, so it will error). If that's what happened, you can still import from your local checkout by running If that's not it, it may be related to the use of sudo. I haven't used CentOS in a few years, so my information is slightly out of date, but as I recall CentOS has been slow to adopt newer Python versions, which often created conflicts between system python and the version used by applications. If that's still the case, you might try creating a virtualenv, activating and then doing a sudo-less |
If I wanted to chuck this and start over, is it as simple as deleting my locally installed repo or do I need to 'uninstall' it somehow? |
What happened with the initial |
Should that work irregardless of the pypostal clone + python setup.py build_ext --inplace I did? I tried the uninstall/install and have the same problem as before. Or does 'python setup.py build_ext --inplace' need to be run in the pypostal clone or in my libpostal directory? I see a setup.py in the scripts folder of libpostal but the docs seemed to indicate I should leave that folder alone. Looking back at my log, I believe this was my initial attempt to install postal:
Seemed to be dependency issue, I think I was missing one of the tools you listed as required. |
Ah, ok. Python.h can be obtained using
|
Yeah, I figured that out which was able to resolve the pip install issue. Just put in some edits to the Readme to that effect to. So I'm not sure where to go from here, then. I can uninstall/install postal successfully and I have libpostal installed.
If I'm trying from another directory:
The path that pip installed to:
|
Ok. I don't think it's a CentOS thing if the other libpostal utilities are working. Somewhere there's Is what you posted a full trace? What's the message after "cannot open shared object file: No such file or directory"? Also, can you do |
Maybe it is something with my libpostal install? Only problem I might see if I was missing a dependency when I installed that, and/or I also confirmed the data directory to be in a totally different place than the libpostal repo clone directory. But that all seemed to work fine and libpostal seems to work fine...I'm pretty stumped. |
Ah, that's a linker issue, nothing wrong with install. Just make sure /usr/local/lib (or wherever you installed libpostal) is on LD_LIBRARY_PATH. Add |
Phew, that seems to have done it! |
I'll close this as it seems to be a pretty individual problem. |
+1 Thanks @easherma! |
Had the same issue and this soled it for me. thanks guys! |
On CentOS, I needed to explicitly tell
If I did that and subsequently ran |
For anyone that still has issues with this, I had to do export LD_LIBRARY_PATH=/usr/local/lib64/ in order for the linker to find the correct file. This was using centOS on AWS EC2 AMI. Hope this helps! |
Not trying to re-start a 1+ year old issue, but can we get #8 (comment) added to the readme? I could send a pr. |
Thank you! This should find place in the official documentation. |
Hi there. Running in terminal on a CentOS7 box. I installed libpostal and can use its utilities, and followed instructions to install python bindings (sudo pip install postal), but I get this error when trying to use code examples:
dir(postal) = ['builtins', 'doc', 'file', 'name', 'package', 'path']
The text was updated successfully, but these errors were encountered: