I am using ipython Jupyter notebook in Windows 10. I have installed Geohash using pip install geohash in cmd. When I try to use geohash( import geohash) following error comes:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-7-840910eb012f> in <module>()
----> 1 import geohash
ImportError: No module named 'geohash'
Again check whether geohash installed or not then following message came while I try to reinstall:
C:\Users\Himal Acharya>pip install geohash
Requirement already satisfied (use --upgrade to upgrade): geohash in c:\users\himal acharya\anaconda3\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.3 in c:\users\himal acharya\anaconda3\lib\site-packages (from geohash)
Again I uninstall geohash. I manually install geohash from github but same problem occur : import error
pip install python-geohash
This should fix it.
pip uninstall Geohash
pip install geohash2
it will install https://github.com/DBarthe/geohash version which is exactly the same as vinsci one but compliant with Python 3 import syntax (DBarthe did what @PoonLany explained in its answer)
Found another way and it works like charm.
from gd-inm source: https://github.com/vinsci/geohash/issues/4
I had the same issue - if you rename the package name to be geohash rather than Geohash and then change init.py to import from .geohash (with a dot in front of the module name) rather than from geohash, the package should work for Python 3.5.2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With