Opened 6 years ago
Last modified 22 months ago
#13051 reopened defect
The initenv process of trac-admin requires more than just 'psycopg2' and 'trac' — at Initial Version
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 1.2.2 |
Severity: | major | Keywords: | setuptools pip wheel |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I figured out the initenv process of trac-admin requires more than just 'psycopg2' and 'trac' to use the postgresql driver, the previous week of last week.
Either it is a bug or the wiki page for database backends is missing an important line ( https://trac.edgewall.org/wiki/DatabaseBackend )
I somehow figured out how to make it work after some digging: I had to also install TracTags from Python Package Index. otherwise I'd get messages like: 'TracError: Unsupported database type "postgres"'
- What I did: useradd -mrd /var/lib/g9-trac g9-trac mkdir -p /var/log/g9
apt install -y virtualenv # virtualenv -p /usr/bin/python3 /var/lib/g9-trac/ve-trac
su - g9-trac
virtualenv -p /usr/bin/python2 /var/lib/g9-trac/ve-trac source /var/lib/g9-trac/ve-trac/bin/activate
pip install trac #it's weird the psycopg2 driver worked only after I installed TracTags pip install psycopg2
trac-admin /var/lib/g9-trac/trac-g9 initenv Gxxxxx9 'postgres://g9-trac:passphrase32!@localhost:5432/trac-g9'
Thank you, Gunwoo Gim