[Trac] Module import error (imp) while setting up svn on Windows

20 views
Skip to first unread message

Olemis Lang

unread,
Sep 2, 2026, 2:21:21 PMSep 2
to Trac Users
Hello !

I´m trying a Trac instance on Windows and I'm not actually getting subversion setup .

Out of the box , after adding a path to an SVN repository via web admin panel , Trac complained about `svn` module not being loaded. I followed the instructions in TracSubversion [1]_page and, as suggested, installed VisualSVN Server . Then copied the contents of VisualSVN Server's PythonPackages folder into the virtual  Python 3 environment used for running Trac and ... results:

```
>>> from svn import core
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from svn import core
  File "C:\PATH\Lib\site-packages\svn\core.py", line 26, in <module>
    from libsvn.core import *
  File "C:\ PATH\Lib\site-packages\libsvn\core.py", line 25, in <module>
    _core = swig_import_helper()
  File "C:\ PATH\Lib\site-packages\libsvn\core.py", line 12, in swig_import_helper
    import imp
ModuleNotFoundError: No module named 'imp'
```

I'd appreciate it if anybody could point out what am I missing (or doing wrong) ?
Thanks in advance !

--
Regards,

Olemis - @olemislc

Featured article:

Jun Omae

unread,
Sep 2, 2026, 8:36:59 PMSep 2
to trac-...@googlegroups.com, ole...@gmail.com
Hi,
The Subversion bindings that bundled in the Visual SVN Server is for Python 2. Also, the `imp` module has been removed in Python 3.12.
You should build the Subversion bindings for Python 3 on Windows from source tarball because no one provides it.

--
Jun Omae <jun...@gmail.com> (大前 潤)
Reply all
Reply to author
Forward
0 new messages