Results 1 to 2 of 2

Thread: Install error on pysqlite2

  1. #1
    Vityok NNTP User

    Default Install error on pysqlite2

    Hey, I'm having an enormous amount of trouble trying to install pysqlite. I'm getting a compile error on sudo python setup.py install on py25tests.py and when I try to import test it cannot find the module _sqlite, even though I clearly see a _sqlite under my site-packages/pysqlite2 dir.

    sudo python setup.py build
    Code:
    running build
    running build_py
    creating build
    creating build/lib.linux-i686-2.3
    creating build/lib.linux-i686-2.3/pysqlite2
    copying pysqlite2/dump.py -> build/lib.linux-i686-2.3/pysqlite2
    copying pysqlite2/__init__.py -> build/lib.linux-i686-2.3/pysqlite2
    copying pysqlite2/dbapi2.py -> build/lib.linux-i686-2.3/pysqlite2
    creating build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/py25tests.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/transactions.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/regression.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/factory.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/dump.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/__init__.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/dbapi.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/types.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/hooks.py -> build/lib.linux-i686-2.3/pysqlite2/test
    copying pysqlite2/test/userfunctions.py -> build/lib.linux-i686-2.3/pysqlite2/test
    running build_ext
    Downloading amalgation.
    Extracting sqlite3.c
    Extracting sqlite3.h
    building 'pysqlite2._sqlite' extension
    creating build/temp.linux-i686-2.3
    creating build/temp.linux-i686-2.3/src
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/prepare_protocol.c -o build/temp.linux-i686-2.3/src/prepare_protocol.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/microprotocols.c -o build/temp.linux-i686-2.3/src/microprotocols.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/statement.c -o build/temp.linux-i686-2.3/src/statement.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/cursor.c -o build/temp.linux-i686-2.3/src/cursor.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/util.c -o build/temp.linux-i686-2.3/src/util.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/module.c -o build/temp.linux-i686-2.3/src/module.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/cache.c -o build/temp.linux-i686-2.3/src/cache.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/connection.c -o build/temp.linux-i686-2.3/src/connection.o
    gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -I/usr/include/python2.3 -c src/row.c -o build/temp.linux-i686-2.3/src/row.o
    gcc -pthread -shared build/temp.linux-i686-2.3/src/module.o build/temp.linux-i686-2.3/src/connection.o build/temp.linux-i686-2.3/src/cursor.o build/temp.linux-i686-2.3/src/cache.o build/temp.linux-i686-2.3/src/microprotocols.o build/temp.linux-i686-2.3/src/prepare_protocol.o build/temp.linux-i686-2.3/src/statement.o build/temp.linux-i686-2.3/src/util.o build/temp.linux-i686-2.3/src/row.o -lsqlite3 -o build/lib.linux-i686-2.3/pysqlite2/_sqlite.so
    sudo python setup.py install
    Code:
    running install
    running build
    running build_py
    running build_ext
    running install_lib
    creating /usr/lib/python2.3/site-packages/pysqlite2
    copying build/lib.linux-i686-2.3/pysqlite2/dump.py -> /usr/lib/python2.3/site-packages/pysqlite2
    copying build/lib.linux-i686-2.3/pysqlite2/__init__.py -> /usr/lib/python2.3/site-packages/pysqlite2
    copying build/lib.linux-i686-2.3/pysqlite2/dbapi2.py -> /usr/lib/python2.3/site-packages/pysqlite2
    creating /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/py25tests.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/transactions.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/regression.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/factory.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/dump.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/__init__.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/dbapi.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/types.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/hooks.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/test/userfunctions.py -> /usr/lib/python2.3/site-packages/pysqlite2/test
    copying build/lib.linux-i686-2.3/pysqlite2/_sqlite.so -> /usr/lib/python2.3/site-packages/pysqlite2
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/dump.py to dump.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/__init__.py to __init__.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/dbapi2.py to dbapi2.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/py25tests.py to py25tests.pyc
      File "/usr/lib/python2.3/site-packages/pysqlite2/test/py25tests.py", line 48
        with self.con:
                ^
    SyntaxError: invalid syntax
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/transactions.py to transactions.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/regression.py to regression.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/factory.py to factory.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/dump.py to dump.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/__init__.py to __init__.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/dbapi.py to dbapi.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/types.py to types.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/hooks.py to hooks.pyc
    byte-compiling /usr/lib/python2.3/site-packages/pysqlite2/test/userfunctions.py to userfunctions.pyc
    running install_data
    Code:
    >>> from pysqlite2 import test
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "pysqlite2/test/__init__.py", line 35, in ?
        from pysqlite2.test import dbapi, types, userfunctions, factory, transactions,\
      File "pysqlite2/test/dbapi.py", line 27, in ?
        import pysqlite2.dbapi2 as sqlite
      File "pysqlite2/dbapi2.py", line 27, in ?
        from pysqlite2._sqlite import *
    ImportError: No module named _sqlite
    Any suggestions would be greatly appreciated. I've been trying a number of things. I have sqlite 3.6.6.2 amalgamation installed and working, python 2.3.

  2. #2
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,879

    Default Re: Install error on pysqlite2

    There's a package python-sqlite2 in the packman repository. Is that what you need?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •