时间:2021-07-01 10:21:17 帮助过:14人阅读
问题原因:
在系统中同时存在多个不同版本的python。当前系统是由python 2.6.6升级到python 2.7.13而来。
解决办法:
[root@localhost sqlite-autoconf-3150000]# find / -name _sqlite3.so /usr/lib64/python2.6/lib-dynload/_sqlite3.so [root@localhost sqlite-autoconf-3150000]# whereis python python: /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz [root@localhost sqlite-autoconf-3150000]# find / -name lib-dynload /usr/lib64/python2.6/lib-dynload /usr/local/python27/lib/python2.7/lib-dynload [root@localhost sqlite-autoconf-3150000]# cp /usr/lib64/python2.6/lib-dynload/_sqlite3.so /usr/local/python27/lib/python2.7/lib-dynload [root@localhost sqlite-autoconf-3150000]# python Python 2.7.13 (default, Mar 9 2017, 04:32:58) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> import rpy2.robjects >>> >>>
ImportError: No module named _sqlite3
标签:code 4.4 升级 most bapi ted init blog format