0

I am trying to install pyzipcode package using

pip install pyzipcode

I have a list of lat,lon data from which I require the Zipcodes. I checked online and pyzipcode came across as the most dependable solution for python. While trying to install I get the error below:

In file included from src/module.c:24:0: src/connection.h:33:21: fatal error: sqlite3.h: No such file or directory compilation terminated. error: command 'Anac\Scripts\gcc.bat' failed with exit status 1

Also there are other results with same errors but haven't found any solution from those.

P.S: Any other way to get ZIPCODES in python from lon,lat will be helpful in the meantime

4
  • @TrisNefzger Okay. Could you guide me to a place where I can find the precompiled version or may be how to go about finding a precompiled version.
    – bshah
    Aug 18 '15 at 22:39
  • @TrisNefzger : I am also getting the line below as error. I just saw this. In file included from src/module.c:24:0: src/connection.h:33:21: fatal error: sqlite3.h: No such file or directory compilation terminated. I thought sqlite comes along Python(2.5) onward. I am running python2.7
    – bshah
    Aug 18 '15 at 22:57
  • 1
    Suggest giving up on finding the precompiled version since pyzipcode just does lookups from a sqlite db built from a csv dating back to 2004. You could roll your own with a more recent zipcode csv from that can be downloaded from census.gov/geo/maps-data/data/gazetteer2014.html (Zip Code Tabulation Areas Gazateer File in which zipcodes are called GEOID), unitedstateszipcodes.org/zip-code-database, and federalgovernmentzipcodes.us.
    – user4322779
    Aug 18 '15 at 23:02
  • 1
    I got wierd errors trying to install pyzipcode too and it does not seem fruitful to continue the effort. There is a csv2sqlite conversion script at github.com/rgrp/csv2sqlite and a tutorial on using sqlite3 from python at zetcode.com/db/sqlitepythontutorial.
    – user4322779
    Aug 18 '15 at 23:10
0

I encountered the same problem when installing pyzipcode on EC2 linux. Solved the issue by sudo yum install sqlite-devel before pip install pyzipcode==1.0. On Ubuntu or other system, it could be sudo apt-get install sqlite-dev or so.

0

From the error. It is expected to install sqlite3 in the system.

Install sqlite3 in ubuntu system with this command:

sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev

In mac use brew:

brew install sqlite3

In windows follow these steps:

  1. Go to SQLite3 download page, “Precompiled Binaries For Windows” section
  2. Download “sqlite-shell” and “sqlite-dll” archive files
  3. Unpack them and set environmental path (i.e., C:\program_files\sqlite3)
  4. Install the sqlite3 Ruby gem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.