2016年2月25日 星期四

[Yocto][Python] How to install pysqlite

tar xvf pysqlite-2.8.1.tar
cd pysqlite-2.8.1
python setup.py install

Reference:
pysqlite 2.8.1

Q:
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_complete’:
src/module.c:101: warning: implicit declaration of function ‘sqlite3_complete’
src/module.c: In function ‘init_sqlite’:
src/module.c:400: warning: implicit declaration of function ‘sqlite3_libversion’
src/module.c:400: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
/usr/local/include/python2.7/stringobject.h:63: note: expected ‘const char *’ but argument is of type ‘int’
error: command 'gcc' failed with exit status 1
A:
sudo apt-get install libsqlite3-dev

Reference:
How to install pysqlite?

root@freeman-laptop:/home/freeman/sdk2_er5/yocto_meta_2.0.0.5/build# python -c 'import pysqlite2'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named pysqlite2

After install pysqlite 2.8.1 will no display error message again.

root@freeman-laptop:/home/freeman/sdk2_er5/yocto_meta_2.0.0.5/build# python -c 'import pysqlite2'

0 意見:

張貼留言