(in memory) database
Peter Otten
__peter__ at web.de
Tue Sep 2 13:04:30 EDT 2008
Zentrader wrote:
>> I don't understand why Cameron has a different version of Python which
>> doesn't seem to have sqlite support enabled.
>
> Agreed, but won't the package manager tell him if python-sqlite is
> installed? That would be the next step since it appears that SQLite
> intself is already installed. Since Ubuntu uses precompied binaries,
> Python should be configured for SQLite which again leaves no python-
> sqlite as the only possibility (yeah right). BTW Python is easy to
> install manually.
When you install Python manually from source you need the header files for
sqlite3 to get sqlite3 support. These are in the libsqlite3-dev package.
I think you can distinguish a manually installed python from the packaged
one by the .../local/... in its path, e. g., on my machine
$ which python2.5 # in the distribution
/usr/bin/python2.5
$ which python2.6
/usr/local/bin/python2.6 # installed from source
I have installed libsqlite3-dev so I can't reproduce Cameron's error, but
here's a similar one for bsddb:
$ python2.5
Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:43)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bsddb
>>> bsddb.__file__
'/usr/lib/python2.5/bsddb/__init__.pyc'
$ python2.6
Python 2.6b2+ (trunk:65902, Aug 20 2008, 08:38:26)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bsddb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/bsddb/__init__.py", line 58, in <module>
import _bsddb
ImportError: No module named _bsddb
Peter
PS: Yes, I'm using 2.6, but I don't think that's relevant for the problem.
More information about the Python-list
mailing list