Matthew Ngaha <chigga...@gmail.com> writes:

> im having problems importing sqlite3 on ubuntu python3.
>
>   File "/usr/local/lib/python3.3/sqlite3/__init__.py", line 23, in <module>
>     from sqlite3.dbapi2 import *
>   File "/usr/local/lib/python3.3/sqlite3/dbapi2.py", line 26, in <module>
>     from _sqlite3 import *
> ImportError: No module named '_sqlite3'
>
> i have that path and file (dbapi2.py). the problem is an import
> statement for _sqlite3. i don't see this file but shouldn't python3.3
> be able to import sqlite without errors? any suggestions? does anyone
> have _sqlite3.py in their   /usr/local/lib/python3.3/sqlite3/
> directory?

The /usr/local heirarchy is not used by official debian/ubuntu packages,
so other people will not have the same contents in there as you.  You
must have a locally built python in /usr/local.  Check the build logs if
it has complained about not being able to build the sqlite3 module.  If
so, you can install all build dependencies for the offical python3
package by running this command:

# apt-get build-dep python3

And then rebuilding your local python3 installation.

-- 
regards,
kushal

Attachment: pgpqnOrb9Kbe6.pgp
Description: PGP signature

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to