-1

I have installed PyBluez-0.22.win32.exe on a 64bit machine with Python 2.7 (they didn't have a 64bit version). Then I get the following error: ImportError:DLL load failed:%1 is not valid Win32 application.

Any idea how I could fix this? enter image description here

Here is the part of code that depends on bluetooth:

from bluetooth import *
import bluetooth._msbt as bt

bt.initwinsock ()
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408

1 Answers1

2

That error message occurs when you try to use a 64-bit Python interpreter and a 32-bit extension module. The same error message can occur if you are using a 32-bit Python interpreter and a 64-bit extension module.

If PyBluez is only available as a 32-bit library, then you'll need to install a 32-bit version of Python.

It looks like unofficial 64-bit versions are available from http://www.lfd.uci.edu/~gohlke/pythonlibs/

casevh
  • 11,093
  • 1
  • 24
  • 35