install geoip on windows?

  • Last Update :
  • Techknowledgy :

pip install GeoIP Copy PIP instructions , Released: Aug 22, 2014 , View statistics for this project via, or by using our public dataset on Google BigQuery ,Status: all systems operational

With pip:

$ pip install GeoIP

From source:

$ python build
$ python install

Suggestion : 2
extension = php_geoip.dll

geoip.custom_directory = D: \AppServ\ php5\

Example usage:

< ? php

 * @author
 * @copyright 2016



Suggestion : 3

If you also want the free MaxMind Geolite2 database you can in addition:,If you have installed the python-geoip-geolite2 package you can start using the GeoIP database right away:,Provides access to the geolite2 cities database. In order to use this database the python-geoip-geolite2 package needs to be installed.,The python-geoip-geolite2 package includes GeoLite2 data created by MaxMind, available from under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

pip install python - geoip
pip install python - geoip - geolite2
>>> from geoip
import geolite2
   match = geolite2.lookup('') >>>
   match is not None
   >>> 'US' >>>
   match.continent 'NA' >>>
   match.timezone 'America/Los_Angeles' >>>
>>> from geoip
import open_database
   db = open_database('path/to/my.mmdb')
from geoip
import open_database

with open_database('data/GeoLite2-City.mmdb') as db:
   match = db.lookup_mine()
print 'My IP info:', match