Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top