473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mac OSX sqlite problem. Missing?

Hi,

I've installed Mac Python 2.5. I'm running Mac OS X 10.4.10 on a
Macbook 1.83GHz. I though that the python sqlite library was
installed by default as part of Mac Python 2.5, however, I still have
a problem.

Sqlite does not appear to be my system:
>>import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sqlite

I ran 'sudo easy_install pysqlite' which gave me the file
'pysqlite-2.3.5-py2.5-macosx-10.3-fat.egg', but no working pysqlite.

I then downloaded the source files and ran 'python ez_setup.py
pysqlite==2.3.5', which told me 'Using /Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site-packages/
pysqlite-2.3.5-py2.5-macosx-10.3-fat.egg'

Still no working version of pysqlite.

Tried installing from source. No problems appeared, but I still can't
use pysqlite.

The reason I am trying to install pysqlite, is to use turbogears,
which initially failed when I ran 'tg-admin sql create', it failed
with 'import sqlite. ImportError: No module named sqlite'.

Any ideas gratefully received.

Thanks.

Sep 10 '07 #1
3 3582
ri*************@gmail.com schrieb:
Hi,

I've installed Mac Python 2.5. I'm running Mac OS X 10.4.10 on a
Macbook 1.83GHz. I though that the python sqlite library was
installed by default as part of Mac Python 2.5, however, I still have
a problem.

Sqlite does not appear to be my system:
>>>import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sqlite

I ran 'sudo easy_install pysqlite' which gave me the file
'pysqlite-2.3.5-py2.5-macosx-10.3-fat.egg', but no working pysqlite.

I then downloaded the source files and ran 'python ez_setup.py
pysqlite==2.3.5', which told me 'Using /Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site-packages/
pysqlite-2.3.5-py2.5-macosx-10.3-fat.egg'

Still no working version of pysqlite.

Tried installing from source. No problems appeared, but I still can't
use pysqlite.

The reason I am trying to install pysqlite, is to use turbogears,
which initially failed when I ran 'tg-admin sql create', it failed
with 'import sqlite. ImportError: No module named sqlite'.

Any ideas gratefully received.
Are you by any chance using the python 2.3 when issuing that import
statement?

Diez
Sep 10 '07 #2
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
>>>
Sep 10 '07 #3
On Sep 10, 1:51 pm, ricardo.turp...@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

Sep 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8006
by: Jim Carlock | last post by:
I added the following lines to PHP.INI. extension=php_pdo.dll extension=php_pdo_sqlite.dll extension=php_sqlite.dll specifically in that order. I noticed the extensions getting loaded are...
10
7535
by: Luigi | last post by:
Hello all! I'm a newbie in PHP. I have written a short script that tries to update a SQLite database with the user data. It is pretty simple, something like this: <?php $sqlite =...
11
2390
by: Tim Streater | last post by:
Running 10.5.3. I'm trying to make a PHP command line script with sqlite calls. But it fails at the first such (sqlite_open), saying "call to undefined function sqlite_open ...". phpinfo() tells...
8
18121
by: john6630 | last post by:
I am trying to get PDO for sqlite to work on my localhost system. I have modified the PHP5.ini file as shown below and run the following PHP script. As stated below, it reports the mssql, mysql and...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.