Python Subversion-Wrapper-Bibliothek

In SubversionDokumentation Es gibt ein Beispiel für die Verwendung von Subversion aus Python

<code>#!/usr/bin/python
import svn.fs, svn.core, svn.repos

def crawl_filesystem_dir(root, directory):
    """Recursively crawl DIRECTORY under ROOT in the filesystem, and return a list of all the paths at or below DIRECTORY."""

    # Get the directory entries for DIRECTORY.
    entries = svn.fs.svn_fs_dir_entries(root, directory)
</code>

Wenn ich diesen Code ausführe, erhalte ich einen Importfehler:

<code>$ python crawl.py
Traceback (most recent call last):
  File "crawl.py", line 7, in <module>
    import svn.fs, svn.core, svn.repos
ImportError: No module named svn.fs
</code>

Das heißt, ich vermisse die Bibliotheksvn. Ich habe versucht, das Paket zu installieren, aber der Python-Paketmanager kann es nicht finden.

<code>$ pip install svn
Downloading/unpacking svn
  Could not find any downloads that satisfy the requirement svn
No distributions at all found for svn
</code>

Wie installiere ich diese Bibliothek?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage