Trac script installer should check for python-pgsql package

The script installer for Trac should check for the python-pgsql pacakge being installed if a PostgreSQL DB is selected.

Project initialization install failed :

Initenv for '/home/robind/htdocs/trac/testtrac' failed.
Failed to create environment.
No module named pyPgSQL
Traceback (most recent call last):
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/admin/console.py", line 578, in do_initenv
    options=options)
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/env.py", line 204, in __init__
    self.create(options)
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/env.py", line 334, in create
    DatabaseManager(self).init_db()
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/api.py", line 81, in init_db
    connector.init_db(**args)
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/postgres_backend.py", line 73, in init_db
    params)
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/postgres_backend.py", line 53, in get_connection
    params)
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/postgres_backend.py", line 167, in __init__
    from pyPgSQL import PgSQL
ImportError: No module named pyPgSQL
Creating and Initializing Project

It's easy enough to work around but should also be easy for you to fix in the next update.

Status: 
Active

Comments

Actually, it already checks for the psycopg Python module when using PostgreSQL.

Does that not work on your system?

Trying to install TRAC but it keeps throwing an error. I found this ticket and seem to be having a similar issue so I'm adding on here. A copy of the error message is below. The package python-psycopg-1.1.21-2.el5.rf is installed. Let me know if you need my license information.

Operating system CentOS Linux 5.4
Perl version 5.008008
Path to Perl /usr/bin/perl
Apache version 2.2.3
PHP version 5.1.6
Logrotate version 3.7.4
MySQL version 5.0.77
PostgreSQL version 8.1.18
ProFTPd version 1.30
Webmin version 1.500
Virtualmin version 3.76 Pro

Thanks
Craig

-----

Found http://ftp.edgewall.com:80/pub/trac/Trac-0.11.6.tar.gz in cache ..
Found http://www.saddi.com:80/software/flup/dist/flup-1.0.tar.gz in cache ..

Now installing Trac version 0.11.6 ..

Project initialization install failed :

Initenv for '/home/trac.dashsystems.com/public_html/testproject' failed.
Does an environment already exist?

.. failed! See the error message above for the reason why.

isdahlc - when you install Trac, are you selecting a MySQL or PostgreSQL database?

Selecting PostgreSQL; should I be using MySQL instead?

I'd recommend it, as MySQL is much better tested and supported. Let us know if that helps..