When emerging www-apss/trac with USE=postgres portage should emerge pyPgSQL as well. Without it trac throws exception. Reproducible: Always Steps to Reproduce: 1.emerge trac with postgres use-flag 2.run trac-admin with postgres as a database 3. Actual Results: Python throws an exception "no pypgsql" Expected Results: Install the database. Workaround: you can choose to install it on other database engines.