sqlite IS installed ...

5 views
Skip to first unread message

Randy Groves

unread,
Sep 28, 2006, 2:12:43 PM9/28/06
to trac-...@googlegroups.com
Attempting to install the new 0.10 version. Had a 0.96 installed
before. As recommended in the UPGRADE file, I removed the 'trac'
directory from site-packages, moved the share/trac directories
aside. The environment is in its infancy, so I'm starting with a new one.

Pysqlite 2.3.2 is installed, and Sqlite 3.3.7. Previous trac worked
fine with it.

After install of new trac, attempt to init a new environment. The result:

...

Database connection string [sqlite:db/trac.db]>

Please specify the type of version control system,
By default, it will be svn.

If you don't want to use Trac with version control integration,
choose the default here and don't specify a repository directory.
in the next question.

Repository type [svn]>

Please specify the absolute path to the version control
repository, or leave it blank to use Trac without a repository.
You can also set the repository location later.

Path to repository [/path/to/repos]> /usr/local/fiwiki/svn/pyses

Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.

Templates directory [/usr/local/oss/share/trac/templates]>
Creating and Initializing Project
Failed to create environment. global name 'sqlite' is not defined
Traceback (most recent call last):
File
"/usr/local/oss/lib/python2.4/site-packages/trac/scripts/admin.py",
line 611, in do_initenv
options=options)
File "/usr/local/oss/lib/python2.4/site-packages/trac/env.py",
line 124, in __init__
self.create(options)
File "/usr/local/oss/lib/python2.4/site-packages/trac/env.py",
line 228, in create
DatabaseManager(self).init_db()
File "/usr/local/oss/lib/python2.4/site-packages/trac/db/api.py",
line 65, in init_db
connector.init_db(**args)
File
"/usr/local/oss/lib/python2.4/site-packages/trac/db/sqlite_backend.py",
line 121, 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/local/oss/lib/python2.4/site-packages/trac/scripts/admin.py",
line 615, in do_initenv
sys.exit(1)
SystemExit: 1

What gives?

-randy


Alistair Campbell

unread,
Sep 28, 2006, 8:07:31 PM9/28/06
to trac-...@googlegroups.com
This happened to me just recently and I had to explicitly add the full
path to pysqlite to PYTHONPATH. I'm sure there is a better way of
doing it, but (on Windows) I had to add:

C:\Python24\Lib\site-packages\pysqlite2
explicitly, even though I already had the site-packages path added.

Hope this helps.

Matt Good

unread,
Sep 29, 2006, 10:36:11 AM9/29/06
to Trac Users
Alistair Campbell wrote:
> This happened to me just recently and I had to explicitly add the full
> path to pysqlite to PYTHONPATH. I'm sure there is a better way of
> doing it, but (on Windows) I had to add:
>
> C:\Python24\Lib\site-packages\pysqlite2
> explicitly, even though I already had the site-packages path added.

What is contained in that folder? If that was actually what fixed your
problem then pysqlite2 was not installed correctly. There should be
"dbapi2.py" and some other files. If that's right then you don't want
the "site-packages/pysqlite2" dir in the path. Maybe the files got put
in another folder below that "site-packages/pysqlite2/pysqlite2" in
which case you could get rid of the nesting and remove the extra
PYTHONPATH.

-- Matt Good

Reply all
Reply to author
Forward
0 new messages