python - 如何在 Python3.6 中激活 socket.AF_BLUETOOTH?
问题描述
我在 Windows 中使用 Python3.6 标准安装,我尝试这样做
>>>import socket
>>>socket.AF_BLUETOOTH
系统响应
AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH'
我和一位同事已经花了一些时间阅读论坛。我扫描了 PythonPath\Lib\ 中的 socket.py,但也没有提到 AF_BLUETOOTH。Anaconda Python中有一个stackoverflow线程Missing socket.AF_BLUETOOTH?其中谈到了重新编译 Python 并在一些 .header 文件中进行了一些更改。
谁能提供更多详细信息如何访问正在运行的 Python/socket/蓝牙?
解决方案
似乎它在 windows 端口上不可用:
可以在 linux 上使用 3.6.7
在 w10 上以 3.6.7 KO
最好在文档中有警告,我已经找到了...
推荐阅读
- linux - 如何获得我的队列:在数字海洋服务器上工作
- algorithm - 非确定性 PDA 如何以及为什么比确定性 PDA 更强大?
- node.js - VersionError:没有找到与 id 匹配的文档
- php - HTML & CSS - 模态正在覆盖另一个模态
- python - 报告形状相同的两个数据框之间的值差异/变化
- php - 如何从给定数组中排除一些重复值并将其显示在选择标签中?
- android - onActivityResult 处的空指针异常
- c# - 以圆心为基准画出一定角度的等腰三角形
- linux - 关闭期望脚本而不关闭 ssh 中的会话
- django - Django 迁移引发 TypeError: Unknown option(s) for sync_cassandra 命令