trac-admin not working.

Hello! I'm back with more trac issues! :)

When I try to run trac-admin, it says this:

Traceback (most recent call last):
  File "./trac-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Trac==1.0

When I check out /usr/lib/python2.6/site-packages/, it doesn't list trac anywhere, which is probably why it isn't running.

Any ideas of what to do?

Status: 
Closed (fixed)

Comments

I assume you are running it from the command line?

If so, you may need to set the PYTHONPATH environment variable first, to something like :

export PYTHONPATH=/home/yourdomain/public_html/lib/python

Basically, it has to be set to the lib/python directory under your Trac install.

Won't that be an issue if I'm running multiple Tracs under multiple sites? It seems like your fix will only work for one site.

It may be an issue if you have multiple different versions of trac installed. Otherwise it should be OK, as PYTHONPATH only specifies the path to the trac libraries .. which should be the same.

Good point, thanks!