我正在尝试为 Python3 安装 libtorrent。它是C++库的包装器。但是,我似乎无法让它工作。
我试过:
$ sudo apt-get install python-libtorrent
$ sudo apt-get install python3-libtorrent
$ sudo apt-get install libtorrent-rasterbar-dev
$ sudo apt-get install libtorrent-rasterbar-dev
PyPi页面没有下载链接,因此似乎无法通过pip安装。有趣的是,它似乎在 Python2 中工作,但不幸的是,该项目的其余部分都在 Python3 中。
在非 Windows 系统上:
setup.py 是通过运行./configure --enable-python-binding
生成的。
选择要用于安装的 Python 版本。
要构建 Python 绑定,请执行以下操作:
跑:
python setup.py build
以根用户身份运行:
python setup.py install
有关详细信息,请参阅:http://www.libtorrent.org/python_binding.html