I am trying to install pysqlite and have troubles with that. I found out that the most probable reason of that is missing sqlite headers and I have to install them. My platform: CentOS release 5.3 (Final). I have Python-2.6.2.
I also found out that I need .rpm files. As far as I have them I execute:
rpm -i sqlite3-devel-3.n.n.n.rpm
and everything should be fine.
However, I do not know where to find sqlite3-devel-3.n.n.n.rpm file. Should it already be on my system? I could not locate it with "locate sqlite3-devel-3". Should I download this file? If yes where I can find it and which version should I use? I mean, the .rpm file should be, probably, consistent with the version of sqlite that I have on my computer? If it is the case, how can I find out the version of my sqlite?
If I type "from pysqlite2 import dbapi2 as sqlite" I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pysqlite2
"yum search pysqlite" gives me the following:
Loaded plugins: fastestmirror
Excluding Packages in global exclude
list Finished
==== Matched: pysqlite ==== python-sqlite.x86_64 : Python bindings
for sqlite.
By the way, I have the following directory: /home/myname/opt/lib/python2.6/sqlite3 and there I have the following files:
dbapi2.py dbapi2.pyc dbapi2.pyo
dump.py dump.pyc dump.pyo
__init__.py __init__.pyc __init__.pyo test
If I type "import unittest" and then "import sqlite3 as sqlite" I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/myname/opt/lib/python2.6/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import * File "/home/myname/opt/lib/python2.6/sqlite3/dbapi2.py",
line 27, in <module>
from _sqlite3 import * ImportError: No module named _sqlite3
Thank you in advance.