python2.7使用sqlite3

  sre

python2.7使用sqlite3出现 import sqlite3 找不到 _sqlite模块的问题:
1、# find / -name _sqlite*.so
/usr/lib64/python2.6/lib-dynload/_sqlite3.so
2、# whereis python2.7
python2: /usr/bin/python2.7 /usr/bin/python2 /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python2.7 /usr/local/bin/python2.7-config /usr/local/bin/python2 /usr/local/lib/python2.7 /usr/include/python2.6
3、cp /usr/lib64/python2.6/lib-dynload/_sqlite3.so /usr/local/lib/python2.7/lib-dynload/_sqlite3.so

LEAVE A COMMENT

Captcha Code