Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install GeoIP on Windows?

Does anybody know how to install GeoIP's C library on Windows in a few simple steps. Even a few complicated steps will do. I researched and tried to compile it from the setup file but failed several times. Sometimes, I get errors saying that GeoIP.h could not be located. Other times I get that bugtrack_url is not a valid option for compilation.

I have tried using pip install GeoIP and I have also tried just using setup.py.

Has anyone had any luck setting this up on Windows?

like image 478
Sunjay Varma Avatar asked Oct 22 '25 22:10

Sunjay Varma


1 Answers

The 'GeoIP.h could not be located' error indicates that you need to install libgeoip-dev first. Though I have no idea how to install it on windows easiy.

I suggest you to use the pygeoip package, based on the following reasons:

  • pygeoip is a pure python package
  • pygeoip supports Python 3
  • pygeoip has wheel support
  • pygeoip has better documentation
  • pygeoip has 50x more downloads on pypi.
  • pygeoip is compatible with GeoIP's API
like image 150
Leonardo.Z Avatar answered Oct 25 '25 11:10

Leonardo.Z



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!