Mac OSX sqlite problem. Missing?
Steve Holden
steve at holdenweb.com
Tue Sep 11 08:26:52 EDT 2007
More information about the Python-list mailing list
Tue Sep 11 08:26:52 EDT 2007
- Previous message (by thread): Mac OSX sqlite problem. Missing?
- Next message (by thread): C API (embedded Python): How to get and set named variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
scottishguy wrote: > On Sep 11, 2:46 am, "attn.steven.... at gmail.com" > <attn.steven.... at gmail.com> wrote: >> On Sep 10, 1:51 pm, ricardo.turp... at gmail.com wrote: >> >> >> >>> Diez B. Roggisch wrote: >>>> Are you by any chance using the python 2.3 when issuing that import >>>> statement? >>>> Diez >>> Unfortunately not :( >>> ibook:~/project1$ python -V >>> Python 2.5 >>> ibook:~/project1$ python >>> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) >>> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin >>> Type "help", "copyright", "credits" or "license" for more information.>>> import sqlite >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> ImportError: No module named sqlite >> Isn't it sqlite3 (instead of sqlite)? >> >> Python 2.5.1c1 (r251c1:54692, Apr 17 2007, 21:12:16) >> [GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin >> Type "help", "copyright", "credits" or "license" for more information.>>> import sqlite3 >>>>> sqlite3.Connection >> <type 'sqlite3.Connection'>>>> sqlite3.Connection.__doc__ >> >> 'SQLite database connection object.' >> >> >> >> I also see it under that name in the repository: >> >> http://svn.python.org/view/python/trunk/Lib/sqlite3/ >> >> -- >> Hope this helps, >> Steven > > The problem is that the user is trying to install the turbogears > framework, and 'tg-admin' tries to import sqlite (not sqlite3) > > He's getting this error: > 'import sqlite. ImportError: No module named sqlite'. > > Without changing the turbogears code, what should he do? Set up a > symbolic link from 'sqlite3' to 'sqlite' ? > An alternative would be to create a local sqlite.py (importable by tg) containing from sqlite3 import * though this may not work with an extension module if namespace tricks are invoked. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden --------------- Asciimercial ------------------ Get on the web: Blog, lens and tag the Internet Many services currently offer free registration ----------- Thank You for Reading -------------
- Previous message (by thread): Mac OSX sqlite problem. Missing?
- Next message (by thread): C API (embedded Python): How to get and set named variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list