i\'m tying to play with sqlite3 on my centos server but it reports always the same error (module installed)....
Python 2.7.3 (default, Jun 29 2012, 19:03:18)
[G
If you're using Python 2.7.3 on a Red Hat 5 or CentOS 5 machine, there was a bug that prevented the SQLite modules from compiling properly when building Python from source; you should see an error message when running make
. It's since been fixed in 2.7.4 so your best option is to upgrade.
If that's not possible, then there's a patch available. Here's the bug page and the patch.
first find:
find / -name _sqlite3.so
/usr/usr/lib/python2.6/lib-dynload/_sqlite3.so
/usr/local/service/python2.7/lib/python2.7/lib-dynload/_sqlite3.so
/usr/lib64/python2.6/lib-dynload/_sqlite3.so
next
cp /usr/local/service/python2.7/lib/python2.7/lib-dynload/_sqlite3.so /usr/local/lib/python2.7/sqlite3/
this centso 6.5 python2.7.10
If you are under RHEL/centos 6, you can try this:
cp /usr/lib64/python2.6/lib-dynload/_sqlite3.so /usr/local/lib/python2.7/sqlite3/
This will work for CentOS:
ln -s /usr/lib64/python2.6/lib-dynload/_sqlite3.so /usr/local/lib/python2.7/lib-dynload/
/usr/local/lib/python2.7/
is already on python's path. No need to duplicate the file or add the python's path.