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/", line 578, in do_initenv
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/", line 204, in __init__
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/", line 334, in create
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/", line 81, in init_db
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/", line 73, in init_db
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/", line 53, in get_connection
  File "/home/robind/htdocs/trac/lib/python/Trac-0.11.5-py2.5.egg/trac/db/", 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.



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



Found in cache ..
Found in cache ..

Now installing Trac version 0.11.6 ..

Project initialization install failed :

Initenv for '/home/' 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..