sqlite in 2.7 on redhat 6

Larry Martell larry.martell at gmail.com
Thu Jun 15 08:45:43 EDT 2017


I am trying to use sqlite

$ python2.7
Python 2.7.10 (default, Feb 22 2016, 12:13:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _sqlite3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named _sqlite3

It's there at: /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_sqlite3.so
but that is not in my path.

I tried adding /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/
to my path and then it fails with:

ImportError: libpython2.7.so.1.0: cannot open shared object file: No
such file or directory

Isn't sqlite part of the standard lib? Shouldn't this just work?



More information about the Python-list mailing list