By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

sqlite for mac?

P: n/a
Does sqlite come in a mac version?

Thanks.

May 1 '07 #1
Share this Question
Share on Google+
14 Replies


P: n/a
7stud <bb**********@yahoo.comwrote:
Does sqlite come in a mac version?
Sure, and it's part of the Python 2.5 for the Mac that you can download
from python.org.
Alex
May 1 '07 #2

P: n/a
Does sqlite come in a mac version?
>
The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) from www.sqlite.org

Daniel
May 1 '07 #3

P: n/a
On May 1, 4:08 am, "Daniel Nogradi" <nogr...@gmail.comwrote:
Does sqlite come in a mac version?

The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) fromwww.sqlite.org

Daniel
I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.

May 1 '07 #4

P: n/a
On May 1, 1:12 pm, 7stud <bbxx789_0...@yahoo.comwrote:
I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.
I it comes on OS X Tiger, and possibly earlier versions as well (it's
used as an index for Mail.app).. You just need to download and
install the pysqlite libraries.

May 1 '07 #5

P: n/a
On May 1, 10:12 am, 7stud <bbxx789_0...@yahoo.comwrote:
On May 1, 4:08 am, "Daniel Nogradi" <nogr...@gmail.comwrote:
Does sqlite come in a mac version?
The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) fromwww.sqlite.org
Daniel

I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.

Did you install Xcode on your Mac? If so then you should have access
to a
C compiler allowing you to compile sqlite from source:

http://sqlite.org/download.html

I checked fink (finkproject.org) but that web site shows
no binary distributions for sqlite3:

http://pdb.finkproject.org/pdb/package.php/sqlite3

--
Hope this helps,
Steven
May 1 '07 #6

P: n/a

On May 1, 2007, at 12:39 PM, kirkjobsluder wrote:
On May 1, 1:12 pm, 7stud <bbxx789_0...@yahoo.comwrote:
>I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.

I it comes on OS X Tiger, and possibly earlier versions as well (it's
used as an index for Mail.app).. You just need to download and
install the pysqlite libraries.
The system sqlite btw (which reports itself as version 3.1.3), is not
the same as what is included in Python 2.5. Will somebody please
say what version of sqlite is supported by Python 2.5?
May 1 '07 #7

P: n/a
I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.
I it comes on OS X Tiger, and possibly earlier versions as well (it's
used as an index for Mail.app).. You just need to download and
install the pysqlite libraries.

The system sqlite btw (which reports itself as version 3.1.3), is not
the same as what is included in Python 2.5. Will somebody please
say what version of sqlite is supported by Python 2.5
I'm using sqlite 3.3.11 with python 2.5 (on linux) but I guess some
earlier versions will also work.

Daniel
May 1 '07 #8

P: n/a
Does sqlite come in a mac version?

The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) fromwww.sqlite.org

Daniel

I'm using python 2.4.4 because the download said there were more mac
modules available for 2.4.4. than 2.5, and I can't seem to locate a
place to download sqlite for mac.
If you use python 2.4.4 you can install the pysqlite module from
http://www.initd.org/tracker/pysqlite/wiki/pysqlite (this is the
interface that is included in python 2.5, you need to install sqlite
itself, probably from source, with any python version).

Daniel
May 1 '07 #9

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2007-05-01, Daniel Nogradi <no*****@gmail.comwrote:
>Does sqlite come in a mac version?

The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) from www.sqlite.org
http://developer.apple.com/documenta...ection_20.html

- --
Ben Secrest <bl******@gmail.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGNy4DeLi5NDZQ3o0RAtVOAJ9AglHEPH/9HUKIsLLWIkaNwoZC8QCaAy7T
MC8VhXY2MyOyp2DaJAPOb0I=
=UGAL
-----END PGP SIGNATURE-----

May 1 '07 #10

P: n/a
On May 1, 6:09 am, Ben Secrest <blsec...@gmail.comwrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2007-05-01, Daniel Nogradi <nogr...@gmail.comwrote:
Does sqlite come in a mac version?
The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) fromwww.sqlite.org

http://developer.apple.com/documenta...ual/OSX_Techno...

- --
Ben Secrest <blsec...@gmail.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGNy4DeLi5NDZQ3o0RAtVOAJ9AglHEPH/9HUKIsLLWIkaNwoZC8QCaAy7T
MC8VhXY2MyOyp2DaJAPOb0I=
=UGAL
-----END PGP SIGNATURE-----
I downloaded pysqlite, ran the setup script, and tested the
installation and everything worked fine. However, if I try to import
either sqlite, sqlite2, or sqlite3 into a python program, I get an
error saying there's no such module.

I assume that means pysqlite cannot see the installation of SQlite
that came preinstalled on my mac. My python book says to download the
SQlite source where automatic code generation has already been
performed. I did that. Then my book says says to follow the
instructions in the README file. However, the download only has two
files: sqlite3.c and sqlite3.h. As a result, I don't know what to
do.

Any advice?

May 3 '07 #11

P: n/a
Did you install Xcode on your Mac?

Yes, Xcode 2.4.

May 3 '07 #12

P: n/a
>Does sqlite come in a mac version?
The interface (pysqlite) is part of the python 2.5 standard library
but you need to install sqlite itself separately (as far as I
remember) fromwww.sqlite.org
http://developer.apple.com/documenta...ual/OSX_Techno...

I downloaded pysqlite, ran the setup script, and tested the
installation and everything worked fine. However, if I try to import
either sqlite, sqlite2, or sqlite3 into a python program, I get an
error saying there's no such module.

I assume that means pysqlite cannot see the installation of SQlite
that came preinstalled on my mac. My python book says to download the
SQlite source where automatic code generation has already been
performed. I did that. Then my book says says to follow the
instructions in the README file. However, the download only has two
files: sqlite3.c and sqlite3.h. As a result, I don't know what to
do.
If all tests ran fine then pysqlite can see your sqlite installation.
How are you importing sqlite? It's usually something like "from
pysqlite2 import dbapi2 as sqlite" not simply "import sqlite". If you
go to the test directory where everything works you can see how those
modules import it and that should definitely work for you as well.

HTH,
Daniel
May 3 '07 #13

P: n/a
Per the pysqlite installation instructions, this is the test I ran to
confirm that pysqlite installed correctly
>from pysqlite2 import test
test.test()
and I got output similar to what the docs say should happen:
>ran 101 tests in 0.182s
My python book, "Beginning Python: From Novice to Professional"(2005),
after giving some brief installation instructions for SQLite and
pysqlite, says:

"Once you have pysqlite installed, you can import it as a module,
under the name sqlite."

and then the author provides this example:
>>>import sqlite
conn = sqlite.connect('somedatabase.db')
>>>curs = conn.cursor()
This cursor can then be used to make SQL queries...
>>>conn.commit()
conn.close()
So that is what I tried. Then I changed "sqlite" to "sqlite2" and
"sqlite3" as well.

May 3 '07 #14

P: n/a
On May 3, 8:37 am, "Daniel Nogradi" <nogr...@gmail.comwrote:
>
If all tests ran fine then pysqlite can see your sqlite installation.
How are you importing sqlite? It's usually something like "from
pysqlite2 import dbapi2 as sqlite" not simply "import sqlite".
I just checked the errata for the book, and it says to use the import
statement you suggested:
from pysqlite2 import dbapi2 as sqlite
May 3 '07 #15

This discussion thread is closed

Replies have been disabled for this discussion.