Quantcast
Channel: Mac – Artur Krzywanski
Viewing all articles
Browse latest Browse all 6

Intalling GeoIP pip package on a Mac OSX

0
0

If you’re getting following error when installing GeoIP pip package:

$ pip install GeoIP
...
    py_GeoIP.c:23:10: fatal error: 'GeoIP.h' file not found
    #include "GeoIP.h"
             ^
    2 warnings and 1 error generated.
    error: command 'cc' failed with exit status 1

    ----------------------------------------
...

you can easily solve it by installing required libraries with brew:

$ brew install geoip
==> Downloading https://homebrew.bintray.com/bottles/geoip-1.6.9.el_capitan.bott
######################################################################## 100.0%
==> Pouring geoip-1.6.9.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/geoip/1.6.9: 16 files, 551.8K

You should be able to install GeoIP pip package now:

$ pip install GeoIP
Collecting GeoIP
  Using cached GeoIP-1.3.2.tar.gz
Building wheels for collected packages: GeoIP
  Running setup.py bdist_wheel for GeoIP ... done
  Stored in directory: /Users/krzywans/Library/Caches/pip/wheels/00/d5/bd/...
Successfully built GeoIP
Installing collected packages: GeoIP
Successfully installed GeoIP-1.3.2

Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images