I am getting svn import errors with trac, what's going on?

Make sure you install the Python bindings of Subversion, just having Subversion is not good enough.

The error reported by Trac will look something like this:

  Indexing repository
  Failed to initialize environment. No module named svn
  Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 616, in do_initenv repos = self.__env.get_repository()
  File "/usr/lib/python2.3/site-packages/trac/env.py", line 155, in get_repository from trac.versioncontrol.svn_fs import SubversionRepository
  File "/usr/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py", line 25, in ?  from svn import fs, repos, core, delta
  ImportError: No module named svn

Note that in recent versions of Trac, this error reads rather: TracError: Unsupported version control system "svn". .

To verify you should have a libsvn and svn directory underneath Python's site-packages directory, but see rather TracSubversion#unsupported-vcs for more detailed troubleshooting information.

If you do not have this use something like the following to fix this:

On Gentoo Linux:

  USE="python" emerge subversion

On FreeBSD use the ports/devel/subversion-python port (preferred way) or ports/devel/subversion with


When using pkgsrc, please make sure to use the pkgsrc/devel/py-subversion pkg.