【问题标题】:How do I activate socket.AF_BLUETOOTH in Python3.6?如何在 Python3.6 中激活 socket.AF_BLUETOOTH?
【发布时间】:2020-07-31 02:22:41
【问题描述】:

我在 Windows 中使用 Python3.6 标准安装,我尝试这样做

>>>import socket
>>>socket.AF_BLUETOOTH

系统响应

AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH'

我和一位同事已经花了一些时间阅读论坛。我扫描了 PythonPath\Lib\ 中的 socket.py,但也没有提到 AF_BLUETOOTH。有一个 stackoverflow 线程 Missing socket.AF_BLUETOOTH in Anaconda Python? 讨论了重新编译 Python 并在一些 .header 文件中进行了一些更改。

谁能提供更多详细信息如何访问正在运行的 Python/socket/蓝牙?

【问题讨论】:

    标签: python sockets bluetooth bluetooth-lowenergy


    【解决方案1】:

    windows 端口好像不可用:

    在 linux 上可以使用 3.6.7

    在 w10 上以 3.6.7 KO

    如果在文档中有警告就好了,我已经找到了...

    【讨论】:

    • 不适用于 Python 3.7.6 Anaconda / Ubuntu 18.04
    猜你喜欢
    • 2015-12-18
    • 2023-04-02
    • 2022-01-06
    • 1970-01-01
    • 2015-05-20
    • 2018-10-21
    • 2012-09-12
    • 2012-06-06
    • 2017-09-02
    相关资源
    最近更新 更多