473,624 Members | 2,612 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.framewor k/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 3594
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.framewor k/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.>>i mport 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.Conne ction
<type 'sqlite3.Connec tion'>
>>sqlite3.Conne ction.__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
8023
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 alphabetally listed, so I'm thinking that the order of the load doesn't matter.
10
7553
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 = sqlite_open("mytest.db", 0666, $sqlite_error);
11
2404
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 me that sqlite support is enabled. What am I missing? TIA - tim
8
18145
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 sqlite2 drivers but then gives a "could not find driver" exception. Any help is greatly appreciated. Also, I am concerned if PDO for sqlite is widely supported by hosting companies, any input or opinions on that? <?php...
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7178
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2614
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 we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.