Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
February 11, 2021 19:55
March 21, 2014 14:25
March 21, 2014 15:47
August 22, 2014 07:58
September 5, 2007 13:47
February 5, 2021 12:41
August 22, 2014 07:58

MaxMind GeoIP Legacy Python Extension API

End of Life

MaxMind will be retiring the GeoIP Legacy databases at the end of May 2022. Until then, this library will only receive critical security and bug fixes. Support for this library will end completely with the last release of the legacy GeoIP databases.

We recommend that you upgrade to our GeoIP2 databases. You can read these from Python using our GeoIP2 Python API.

See our blog post for more information.


  • Python 2.5+ or 3.3+
  • GeoIP Legacy C Library 1.4.7 or greater


With pip:

$ pip install GeoIP

From source:

$ python build
$ python install

IP Geolocation Usage

IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP database should not be used to identify a particular address or household.


See the examples in the examples folder.


If you get a " cannot open shared object No such file or directory" error, add /usr/local/lib to /etc/ then run /sbin/ldconfig /etc/


Copyright (c) 2014 MaxMind LLC

All rights reserved. This package is free software; it is licensed under the LGPL 2.1 or greater.