sqlite for mac?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 7stud

    #1

    sqlite for mac?

    Does sqlite come in a mac version?

    Thanks.

  • Alex Martelli

    #2
    Re: sqlite for mac?

    7stud <bbxx789_05ss@y ahoo.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

    Comment

    • Daniel Nogradi

      #3
      Re: sqlite for mac?

      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

      Comment

      • 7stud

        #4
        Re: sqlite for mac?

        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.

        Comment

        • kirkjobsluder

          #5
          Re: sqlite for mac?

          On May 1, 1:12 pm, 7stud <bbxx789_0...@y ahoo.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.

          Comment

          • attn.steven.kuo@gmail.com

            #6
            Re: sqlite for mac?

            On May 1, 10:12 am, 7stud <bbxx789_0...@y ahoo.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:



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

            The Fink Team wants to bring the full world of Unix Open Source software to Darwin and Mac OS X. We modify Unix software so that it compiles and runs on Mac OS X and make it available for download as a coherent distribution


            --
            Hope this helps,
            Steven


            Comment

            • Michael Bentley

              #7
              Re: sqlite for mac?


              On May 1, 2007, at 12:39 PM, kirkjobsluder wrote:
              On May 1, 1:12 pm, 7stud <bbxx789_0...@y ahoo.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?


              Comment

              • Daniel Nogradi

                #8
                Re: sqlite for mac?

                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

                Comment

                • Daniel Nogradi

                  #9
                  Re: sqlite for mac?

                  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

                  Comment

                  • Ben Secrest

                    #10
                    Re: sqlite for mac?

                    -----BEGIN PGP SIGNED MESSAGE-----
                    Hash: SHA1

                    On 2007-05-01, Daniel Nogradi <nogradi@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


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

                    iD8DBQFGNy4DeLi 5NDZQ3o0RAtVOAJ 9AglHEPH/9HUKIsLLWIkaNwo ZC8QCaAy7T
                    MC8VhXY2MyOyp2D aJAPOb0I=
                    =UGAL
                    -----END PGP SIGNATURE-----

                    Comment

                    • 7stud

                      #11
                      Re: sqlite for mac?

                      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)
                      >
                      iD8DBQFGNy4DeLi 5NDZQ3o0RAtVOAJ 9AglHEPH/9HUKIsLLWIkaNwo ZC8QCaAy7T
                      MC8VhXY2MyOyp2D aJAPOb0I=
                      =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?

                      Comment

                      • 7stud

                        #12
                        Re: sqlite for mac?

                        Did you install Xcode on your Mac?

                        Yes, Xcode 2.4.

                        Comment

                        • Daniel Nogradi

                          #13
                          Re: sqlite for mac?

                          >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

                          Comment

                          • 7stud

                            #14
                            Re: sqlite for mac?

                            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"(2 005),
                            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.d b')
                            >>>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.

                            Comment

                            • 7stud

                              #15
                              Re: sqlite for mac?

                              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

                              Comment

                              Working...