Thursday 15 May 2014

Python geopy install -



Python geopy install -

i trying install geopy in python. how do in simple terms? have python 3.4.0 launcher installed. write geopy install command? on text file .py extension? or in terminal? have read ways install geopy, using easy-install , pip. 1 should use? below 1 illustration have read:

mkdir -p $home/lib/pythonx.y, x.y python version, , press enter. easy_install-x.y package, bundle name of bundle install, , press enter.

below installation have read:

pip install geopy >>> geopy.geocoders import nominatim >>> geolocator = nominatim() >>> location = geolocator.geocode("175 5th avenue nyc") >>> print(location.address) flatiron building, 175, 5th avenue, flatiron, new york, nyc, new york, ... >>> print(location.latitude, location.longitude) (40.7410861, -73.9896297241625) >>> print(location.raw) {u'place_id': u'9167009604', u'type': u'attraction', ...}

so, in above code, writing this, because printing result upon request? in terminal? have python launcher can't seem write new script within it, loads text files .py extension.

apologies asking basics here. much novice. if explain how install geopy , execute above geocoding technique in step-by-step way, much appreciated.

assuming have pip installed (as miles mentioned), in terminal, type:

pip install geopy

then should able utilize geopy module in python. seek terminal

python >>> geopy.geocoders import nominatim >>> geolocator = nominatim() ...etc

python geopy

No comments:

Post a Comment