After installing PyBluez on Windows8.1 I get DLL %1 not valid win32 app

送分小仙女□ 提交于 2019-12-25 17:37:21

问题


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?

Here is the part of code that depends on bluetooth:

from bluetooth import *
import bluetooth._msbt as bt

bt.initwinsock ()

回答1:


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/



来源:https://stackoverflow.com/questions/34168384/after-installing-pybluez-on-windows8-1-i-get-dll-1-not-valid-win32-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!