python - Geopy Import Error -
i have problems in using geopy package.
have installed pip , i'm using python 2.7.3.
geopy correctly installed under
/usr/local/lib/python2.7/dist-packages
i've tried run file importing geopy.geocoders suggested geopy's documentation:
from geopy.geocoders import nominatim geolocator = nominatim()
but have error:
traceback (most recent call last): file "geopy.py", line 1, in <module> geopy.geocoders import nominatim importerror: no module named geocoders
i checked python path printing sys.path() , think correct because shows me correctly
/usr/local/lib/python2.7/dist-packages/geopy
and
/usr/local/lib/python2.7/dist-packages/geopy-1.10.0.dist-info
i've tried uninstall , reinstall geopy, using easy_install instead of pip nothing changed.
any ideas? thank you.
the issue module name geopy , higher on pythonpath dist-packages directory. in order fix this, rename python file.
in order verify this, can run python in verbose mode (python -v) , when importing tell trying import from. in case should tell it's looking in geopy.pyc opposed /usr/local/lib/python2.7/dist-packages/
Comments
Post a Comment