I have installed python libtorrent on my Windows 7 machine using the .msi installer. When I do import libtorrent I get the following error:

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.

Any idea what I am doing wrong?

有帮助吗?

解决方案

It can be due to the architecture of your OS. Check if your OS is 64 bit and you are running Python 64bit. If not try to match them and the problem might be solved. And also check if your libtorrent is 64/32 bit as appropriate. If your OS and python are 64 bit and you are using 32 bit libtorrent, this issue can occur.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top