Cannot install pysqlite on Cygwin

Discussion in 'Python' started by Tilman Kispersky, Sep 29, 2008.

  1. I am trying to install sqlite for use with python on cygwin. I have
    installed the sqlite packages from cygwin (that is libsqlite3-devel
    and libsqlite3_0). When attempting to easy_install pysqlite I get:

    $ easy_install pysqlite
    Searching for pysqlite
    Reading http://pypi.python.org/simple/pysqlite/
    Reading http://pysqlite.org/
    Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
    Reading http://pysqlite.sourceforge.net/
    Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.4/
    Reading http://initd.org/tracker/pysqlite/wiki/PysqliteDownloads
    Reading http://oss.itsystementwicklung.de/trac/pysqlite
    Reading http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/
    Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
    Reading http://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/
    Reading http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/
    Best match: pysqlite 2.5.0
    Downloading http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/pysqlite-2.5.0.tar.gz
    Processing pysqlite-2.5.0.tar.gz
    Running pysqlite-2.5.0/setup.py -q bdist_egg --dist-dir /cygdrive/c/
    Users/Tilman/AppData/Local/Temp/easy_install-876nHz/pysqlite-2.5.0/egg-
    dist-tmp-7mr3WS
    warning: no files found matching 'doc/*.html'
    warning: no files found matching 'doc/code/*.py'
    src/statement.c: In function `pysqlite_statement_recompile':
    src/statement.c:351: warning: `sqlite3_transfer_bindings' is
    deprecated (declared at /usr/include/sqlite3.h:3985)
    build/temp.cygwin-1.5.25-i686-2.5/src/connection.o: In function
    `pysqlite_enable_load_extension':
    /cygdrive/c/Users/Tilman/AppData/Local/Temp/easy_install-876nHz/
    pysqlite-2.5.0/src/connection.c:922: undefined reference to
    `_sqlite3_enable_load_extension'
    collect2: ld returned 1 exit status
    error: Setup script exited with error: command 'gcc' failed with exit
    status 1
    $


    It seems to me this is due to some missing library (undefined
    reference...) but I have no idea what these missing files might be.
    I've tried installing everything that made any reference to sqlite
    form the cygwin interface. Does anyone know how I might get a working
    install of sqlite for python on cygwin?
    Tilman Kispersky, Sep 29, 2008
    #1
    1. Advertising

  2. Tilman Kispersky wrote:
    > I am trying to install sqlite for use with python on cygwin. I have
    > installed the sqlite packages from cygwin (that is libsqlite3-devel
    > and libsqlite3_0). When attempting to easy_install pysqlite I get:
    > [...]
    > build/temp.cygwin-1.5.25-i686-2.5/src/connection.o: In function
    > `pysqlite_enable_load_extension':
    > /cygdrive/c/Users/Tilman/AppData/Local/Temp/easy_install-876nHz/
    > pysqlite-2.5.0/src/connection.c:922: undefined reference to
    > `_sqlite3_enable_load_extension' [...]


    It might be that Cygwin's SQLite doesn't support loading extensions.

    Either:

    Rebuild SQLite from source on Cygwin and be sure to include

    --enable-load-extension when calling ./configure.

    Or hack the pysqlite sources and remove these lines in src/connection.c:

    #if SQLITE_VERSION_NUMBER >= 3003008
    #define HAVE_LOAD_EXTENSION
    #endif

    I'm very interested how you can fix the problem.

    -- Gerhar
    Gerhard Häring, Sep 29, 2008
    #2
    1. Advertising

  3. Tilman  Kispersky

    Steve Holden Guest

    Tilman Kispersky wrote:
    > I am trying to install sqlite for use with python on cygwin. I have
    > installed the sqlite packages from cygwin (that is libsqlite3-devel
    > and libsqlite3_0). When attempting to easy_install pysqlite I get:
    >
    > $ easy_install pysqlite
    > Searching for pysqlite
    > Reading http://pypi.python.org/simple/pysqlite/
    > Reading http://pysqlite.org/
    > Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
    > Reading http://pysqlite.sourceforge.net/
    > Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.4/
    > Reading http://initd.org/tracker/pysqlite/wiki/PysqliteDownloads
    > Reading http://oss.itsystementwicklung.de/trac/pysqlite
    > Reading http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/
    > Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
    > Reading http://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/
    > Reading http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/
    > Best match: pysqlite 2.5.0
    > Downloading http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/pysqlite-2.5.0.tar.gz
    > Processing pysqlite-2.5.0.tar.gz
    > Running pysqlite-2.5.0/setup.py -q bdist_egg --dist-dir /cygdrive/c/
    > Users/Tilman/AppData/Local/Temp/easy_install-876nHz/pysqlite-2.5.0/egg-
    > dist-tmp-7mr3WS
    > warning: no files found matching 'doc/*.html'
    > warning: no files found matching 'doc/code/*.py'
    > src/statement.c: In function `pysqlite_statement_recompile':
    > src/statement.c:351: warning: `sqlite3_transfer_bindings' is
    > deprecated (declared at /usr/include/sqlite3.h:3985)
    > build/temp.cygwin-1.5.25-i686-2.5/src/connection.o: In function
    > `pysqlite_enable_load_extension':
    > /cygdrive/c/Users/Tilman/AppData/Local/Temp/easy_install-876nHz/
    > pysqlite-2.5.0/src/connection.c:922: undefined reference to
    > `_sqlite3_enable_load_extension'
    > collect2: ld returned 1 exit status
    > error: Setup script exited with error: command 'gcc' failed with exit
    > status 1
    > $
    >
    >
    > It seems to me this is due to some missing library (undefined
    > reference...) but I have no idea what these missing files might be.
    > I've tried installing everything that made any reference to sqlite
    > form the cygwin interface. Does anyone know how I might get a working
    > install of sqlite for python on cygwin?


    I believe it's a glitch in the 2.5.1 distribution current on Cygwin - I
    had to install the _sqlite DLL separately to get it to work, but no
    recompilation was necessary AFAICR.

    Chui Tey detailed the necessary steps in his blog post "Cygwin Python
    and sqlite3", but sadly it got lost and he hasn't replenished it, so you
    will have to stab around to see if there's a cached copy anywhere.

    regards
    Steve
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC http://www.holdenweb.com/
    Steve Holden, Sep 29, 2008
    #3
  4. Re: Cannot install pysqlite on Cygwin

    On Sep 29, 7:49 am, Steve Holden <> wrote:
    > Tilman Kispersky wrote:
    > > I am trying to install sqlite for use with python oncygwin. I have
    > > installed the sqlite packages fromcygwin(that is libsqlite3-devel
    > > and libsqlite3_0).  When attempting to easy_install pysqlite I get:

    >
    > > $ easy_install pysqlite
    > > Searching for pysqlite
    > > Readinghttp://pypi.python.org/simple/pysqlite/
    > > Readinghttp://pysqlite.org/
    > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
    > > Readinghttp://pysqlite.sourceforge.net/
    > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.4/
    > > Readinghttp://initd.org/tracker/pysqlite/wiki/PysqliteDownloads
    > > Readinghttp://oss.itsystementwicklung.de/trac/pysqlite
    > > Readinghttp://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/
    > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
    > > Readinghttp://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/
    > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/
    > > Best match: pysqlite 2.5.0
    > > Downloadinghttp://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/pysqlit...
    > > Processing pysqlite-2.5.0.tar.gz
    > > Running pysqlite-2.5.0/setup.py -q bdist_egg --dist-dir /cygdrive/c/
    > > Users/Tilman/AppData/Local/Temp/easy_install-876nHz/pysqlite-2.5.0/egg-
    > > dist-tmp-7mr3WS
    > > warning: no files found matching 'doc/*.html'
    > > warning: no files found matching 'doc/code/*.py'
    > > src/statement.c: In function `pysqlite_statement_recompile':
    > > src/statement.c:351: warning: `sqlite3_transfer_bindings' is
    > > deprecated (declared at /usr/include/sqlite3.h:3985)
    > > build/temp.cygwin-1.5.25-i686-2.5/src/connection.o: In function
    > > `pysqlite_enable_load_extension':
    > > /cygdrive/c/Users/Tilman/AppData/Local/Temp/easy_install-876nHz/
    > > pysqlite-2.5.0/src/connection.c:922: undefined reference to
    > > `_sqlite3_enable_load_extension'
    > > collect2: ld returned 1 exit status
    > > error: Setup script exited with error: command 'gcc' failed with exit
    > > status 1
    > > $

    >
    > > It seems to me this is due to some missing library (undefined
    > > reference...) but I have no idea what these missing files might be.
    > > I've tried installing everything that made any reference to sqlite
    > > form thecygwininterface.  Does anyone know how I might get a working
    > > install of sqlite for python oncygwin?

    >
    > I believe it's a glitch in the 2.5.1 distribution current onCygwin- I
    > had to install the _sqlite DLL separately to get it to work, but no
    > recompilation was necessary AFAICR.
    >
    > Chui Tey detailed the necessary steps in his blog post "CygwinPython
    > and sqlite3", but sadly it got lost and he hasn't replenished it, so you
    > will have to stab around to see if there's a cached copy anywhere.
    >
    > regards
    >  Steve
    > --
    > Steve Holden        +1 571 484 6266   +1 800 494 3119
    > Holden Web LLC              http://www.holdenweb.com/


    Well, I haven't managed to solve the problem.

    I tried following these instructions but get the same error:
    http://initd.org/pub/software/pysqlite/doc/install-source-win32.html

    And I also tried downloading the dll from sqlite.org and putting it on
    my path.

    Since someone asked how I ended up solving this problem:
    I'm just going to work on my Linux box where its relatively straight
    forward to install
    this stuff with the package manager.

    If someone does have instructions for making this work on windows I'd
    be very curious. I was unable to find an archived version of the blog
    post referenced above.
    Tilman Kispersky, Sep 29, 2008
    #4
  5. Re: Cannot install pysqlite on Cygwin

    On Sep 29, 12:37 pm, Tilman Kispersky <> wrote:
    > On Sep 29, 7:49 am, Steve Holden <> wrote:
    >
    >
    >
    > > Tilman Kispersky wrote:
    > > > I am trying to install sqlite for use with python oncygwin. I have
    > > > installed the sqlite packages fromcygwin(that is libsqlite3-devel
    > > > and libsqlite3_0).  When attempting to easy_install pysqlite I get:

    >
    > > > $ easy_install pysqlite
    > > > Searching for pysqlite
    > > > Readinghttp://pypi.python.org/simple/pysqlite/
    > > > Readinghttp://pysqlite.org/
    > > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
    > > > Readinghttp://pysqlite.sourceforge.net/
    > > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.4/
    > > > Readinghttp://initd.org/tracker/pysqlite/wiki/PysqliteDownloads
    > > > Readinghttp://oss.itsystementwicklung.de/trac/pysqlite
    > > > Readinghttp://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/
    > > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
    > > > Readinghttp://oss.itsystementwicklung.de/download/pysqlite/2.4/2.4.1/
    > > > Readinghttp://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/
    > > > Best match: pysqlite 2.5.0
    > > > Downloadinghttp://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/pysqlit...
    > > > Processing pysqlite-2.5.0.tar.gz
    > > > Running pysqlite-2.5.0/setup.py -q bdist_egg --dist-dir /cygdrive/c/
    > > > Users/Tilman/AppData/Local/Temp/easy_install-876nHz/pysqlite-2.5.0/egg-
    > > > dist-tmp-7mr3WS
    > > > warning: no files found matching 'doc/*.html'
    > > > warning: no files found matching 'doc/code/*.py'
    > > > src/statement.c: In function `pysqlite_statement_recompile':
    > > > src/statement.c:351: warning: `sqlite3_transfer_bindings' is
    > > > deprecated (declared at /usr/include/sqlite3.h:3985)
    > > > build/temp.cygwin-1.5.25-i686-2.5/src/connection.o: In function
    > > > `pysqlite_enable_load_extension':
    > > > /cygdrive/c/Users/Tilman/AppData/Local/Temp/easy_install-876nHz/
    > > > pysqlite-2.5.0/src/connection.c:922: undefined reference to
    > > > `_sqlite3_enable_load_extension'
    > > > collect2: ld returned 1 exit status
    > > > error: Setup script exited with error: command 'gcc' failed with exit
    > > > status 1
    > > > $

    >
    > > > It seems to me this is due to some missing library (undefined
    > > > reference...) but I have no idea what these missing files might be.
    > > > I've tried installing everything that made any reference to sqlite
    > > > form thecygwininterface.  Does anyone know how I might get a working
    > > > install of sqlite for python oncygwin?

    >
    > > I believe it's a glitch in the 2.5.1 distribution current onCygwin- I
    > > had to install the _sqlite DLL separately to get it to work, but no
    > > recompilation was necessary AFAICR.

    >
    > > Chui Tey detailed the necessary steps in his blog post "CygwinPython
    > > and sqlite3", but sadly it got lost and he hasn't replenished it, so you
    > > will have to stab around to see if there's a cached copy anywhere.

    >
    > > regards
    > >  Steve
    > > --
    > > Steve Holden        +1 571 484 6266   +1 800 494 3119
    > > Holden Web LLC              http://www.holdenweb.com/

    >
    > Well, I haven't managed to solve the problem.
    >
    > I tried following these instructions but get the same error:http://initd.org/pub/software/pysqlite/doc/install-source-win32.html
    >
    > And I also tried downloading the dll from sqlite.org and putting it on
    > my path.
    >
    > Since someone asked how I ended up solving this problem:
    > I'm just going to work on my Linux box where its relatively straight
    > forward to install
    > this stuff with the package manager.
    >
    > If someone does have instructions for making this work on windows I'd
    > be very curious. I was unable to find an archived version of the blog
    > post referenced above.


    I also managed to get it to work by not using cygwin's python.
    I suppose this is sort of the obvious solution.

    Just download the windows installers for python, pysqlite.
    You can still run the windows installed version of python from cygwin
    (I prefer that over the 'cmd' terminal) by specifying
    the executable you want to use explicity eg:
    $ /cygdrive/c/Python25/python
    Tilman Kispersky, Sep 29, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hemanth P.S.
    Replies:
    0
    Views:
    348
    Hemanth P.S.
    Sep 18, 2003
  2. F. GEIGER
    Replies:
    2
    Views:
    541
    F. GEIGER
    May 21, 2005
  3. Gerhard Häring
    Replies:
    3
    Views:
    376
    Gerhard Häring
    Mar 13, 2008
  4. Geon.
    Replies:
    6
    Views:
    459
    Gerhard Häring
    Nov 12, 2008
  5. SVCitian
    Replies:
    4
    Views:
    479
    Ilya Zakharevich
    Nov 23, 2010
Loading...

Share This Page