Search code examples
pythonpython-3.xpybluez

Failure installing pybluez


I want to install pybluez with python 3.8 but get this error:

C:\wndows\system32>pip install pybluez
Collecting pybluez
  Using cached PyBluez-O.22.zip
    Complete output from command python setup.py egg_info:
    Could not find the Windows Platform SDK

    -----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Rostan\AppData\Local\Temp\pip-build-nx_jjne7\pybluez\

I tried to download it from the PyPI - the Python Package Index, but the latest version is for Python 3.5 (I am using Python 3.8)


Solution

  • As far as I know, there is still no fix for pybluez on Windows.

    Personally, I use pybluez2 and it function the exact same as pybluez.

    To install pybluez 2:

    pip install pybluez2

    Starter/Test Code:

    import bluetooth as bt
    devices = bt.discover_devices(lookup_names=True)
    print("Devices found: %s" % len(devices))