[pysqlite] PySqlite installation probleme

Styx styx13 at wanadoo.fr
Fri Mar 10 13:44:25 CET 2006


Hi !

I'm using fedora core 2 with sqlite 3.3.4 and python 2.3.3

I tried to install PySqlite 2.1.3 (in order to use Trac with Subversion) and when i want to create a new environement with Trac, i got a problem with sqlite, and i think it is linked to PySqlite.

In deed, when i create the environement with trac-admin, i got this error : 
  Failed to create environment. global name 'sqlite' is not defined
  Traceback (most recent call last):
    File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 139, in env_create
      self.__env = Environment(self.envname, create=True, db_str=db_str)
    File "/usr/lib/python2.3/site-packages/trac/env.py", line 79, in __init__
      self.create(db_str)
    File "/usr/lib/python2.3/site-packages/trac/env.py", line 197, in create
      db.init_db(self.path, db_str)
    File "/usr/lib/python2.3/site-packages/trac/db.py", line 442, in init_db
      cls.init_db(**args)
    File "/usr/lib/python2.3/site-packages/trac/db.py", line 321, in init_db
      cnx = sqlite.connect(path, timeout=int(params.get('timeout', 10000)))
  NameError: global name 'sqlite' is not defined
  Failed to initialize environment. 1
  Traceback (most recent call last):
    File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 594, in do_initenv
      self.env_create(db_str)
    File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 144, in env_create
      sys.exit(1)
  SystemExit: 1

So i decided to check the installation of PySqlite using the test script and it gave : 
  ./test-pysqlite
  Traceback (most recent call last):
    File "./test-pysqlite", line 2, in ?
      from pysqlite2.test import test
    File "/root/pysqlite-2.1.3/pysqlite2/test/__init__.py", line 25, in ?
      from pysqlite2.test import dbapi, types, userfunctions, factory, transactions
    File "/root/pysqlite-2.1.3/pysqlite2/test/dbapi.py", line 26, in ?
      import pysqlite2.dbapi2 as sqlite
    File "/usr/lib/python2.3/site-packages/pysqlite2/dbapi2.py", line 32, in ?
      from pysqlite2._sqlite import *
  ImportError: libsqlite3.so.0: cannot open shared object file: No such file or directory

And here is the result when i launch : python ./setup.py test (from pysqlite-2.1.3)
  running test
  running egg_info
  writing requirements to ./pysqlite.egg-info/requires.txt
  writing ./pysqlite.egg-info/PKG-INFO
  writing top-level names to ./pysqlite.egg-info/top_level.txt
  running build_ext
  copying build/lib.linux-i686-2.3/pysqlite2/_sqlite.so -> pysqlite2
  Traceback (most recent call last):
    File "./setup.py", line 151, in ?
      main()
    File "./setup.py", line 137, in main
      classifiers = [
    File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/core.py", line 149, in setup
    File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/dist.py", line 907, in run_commands
    File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/dist.py", line 927, in run_command
    File "/usr/lib/python2.3/site-packages/setuptools-0.6a6-py2.3.egg/setuptools/command/test.py", line 56, in run
      self.run_tests()
    File "/usr/lib/python2.3/site-packages/setuptools-0.6a6-py2.3.egg/setuptools/command/test.py", line 69, in run_tests
      unittest.main(None, None, [unittest.__file__]+self.test_args)
    File "/usr/lib/python2.3/unittest.py", line 720, in __init__
      self.parseArgs(argv)
    File "/usr/lib/python2.3/unittest.py", line 747, in parseArgs
      self.createTests()
    File "/usr/lib/python2.3/unittest.py", line 753, in createTests
      self.module)
    File "/usr/lib/python2.3/unittest.py", line 519, in loadTestsFromNames
      suites.append(self.loadTestsFromName(name, module))
    File "/usr/lib/python2.3/unittest.py", line 493, in loadTestsFromName
      obj = getattr(obj, part)
  AttributeError: 'module' object has no attribute 'suite'

Has someone an idea ?

Thanks for your attention :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.initd.org/pipermail/pysqlite/attachments/20060310/8a8b3d63/attachment.htm


More information about the Pysqlite mailing list