Python libtorrent

Posted

技术标签:

【中文标题】Python libtorrent【英文标题】: 【发布时间】:2013-10-28 12:55:30 【问题描述】:

我已经使用 .msi 安装程序在我的 Windows 7 机器上安装了 python libtorrent。当我导入 libtorrent 时,出现以下错误:

Traceback (most recent call last):
  File "x:\Dropbox\PyDVR\torrent.py", line 3, in <module>
    import libtorrent as lt
ImportError: DLL load failed: %1 is not a valid Win32 application.

知道我做错了什么吗?

【问题讨论】:

你使用的代码? 【参考方案1】:

这可能与您的操作系统架构有关。检查您的操作系统是否为 64 位,并且您正在运行 Python 64 位。如果不尝试匹配它们,问题可能会得到解决。并且还要检查你的 libtorrent 是否是 64/32 位的。如果您的操作系统和 python 是 64 位,而您使用的是 32 位 libtorrent,则可能会出现此问题。

【讨论】:

我正在运行 Windows 7 64 位和 Python 64 位:Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 位 (AMD64 )] 在 win32 上键入“帮助”、“版权”、“信用”或“许可证”以获取更多信息。 python libtorrent 在此处仅作为 win32 提供:link 你的 libtorrent 是 64 位二进制文​​件吗? 我为 python 2.7 安装了 Python 2.7 32 位和 libtorrent,这很有效。 我注意到很多 python 库也只能在 32 位模式下工作。

以上是关于Python libtorrent的主要内容,如果未能解决你的问题,请参考以下文章

Python代写,Python作业代写,代写Python,代做Python

Python开发

Python,python,python

Python 介绍

Python学习之认识python

python初识