Search code examples
python-3.xgeohashing

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 while doing pip3 install python-geohash


I tried all combinations and nothing made import geohash work:

  1. pip install geohash
  2. pip3 install geohash
  3. apt-get install python-dev
  4. pip3 install python-geohash

the 4th one isn't even installing but threw an error on me saying: src/geohash.cpp:538:20: fatal error: Python.h: No such file or directory #include ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Solution

  • Thanks @William D. Irons. The issue got fixed when I did sudo apt-get install libpython3.7-dev