4

我想用 python 3.8 安装 pybluez 但得到这个错误:

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\

我尝试从PyPI - Python Package Index下载它,但最新版本适用于 Python 3.5(我使用的是 Python 3.8)

4

1 回答 1

0

据我所知,Windows 上的 pybluez 仍然没有修复。

就个人而言,我使用 pybluez2,它的功能与 pybluez 完全相同。

要安装 pybluez 2:

点安装 pybluez2

启动器/测试代码:

import bluetooth as bt
devices = bt.discover_devices(lookup_names=True)
print("Devices found: %s" % len(devices))
于 2021-12-13T05:33:38.803 回答