简体   繁体   中英

Error installing a python module - pyzipcode, sqlite3

I am using python27 , pip on windows10. I am trying to install pyzipcode module. But I am facing this error.

In file included from src/module.c:24:
     src/connection.h:33:21: error: sqlite3.h: No such file or directory
     In file included from src/module.c:24:
     src/connection.h:38: error: expected specifier-qualifier-list before 'sqlite3'
     In file included from src/module.c:25:
     src/statement.h:37: error: expected specifier-qualifier-list before 'sqlite3'
     src/module.c: In function 'module_connect':
     src/module.c:63: error: 'SQLITE_OPEN_READWRITE' undeclared (first use in this function)
     src/module.c:63: error: (Each undeclared identifier is reported only once
     src/module.c:63: error: for each function it appears in.)
     src/module.c:63: error: 'SQLITE_OPEN_CREATE' undeclared (first use in this function)
     src/module.c: In function 'module_complete':
     src/module.c:102: warning: implicit declaration of function 'sqlite3_complete'
     src/module.c: In function 'init_sqlite':
     src/module.c:401: warning: implicit declaration of function 'sqlite3_libversion'
     src/module.c:401: warning: passing argument 1 of 'PyString_FromString' makes pointer from integer without a cast
     error: command 'c:\\mingw\\bin\\gcc.exe' failed with exit status 1

May be your gcc or gcc+ package have some problem. Please install it first, and then try installing pyzipcode again.

"pip install pandas" might help you in installing or updating gcc

When you install pyzipcode, it requires pysqlite. Pysqlite is built from source (hence the mingw involvement), but it requires (at least) the development header file for it.

However, Python 2.7 has a built-in library for sqlite, so this may not be needed. Try using pip with the 'do not install dependencies' option.

pip install --no-deps pyzipcode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM