首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在windows cmd提示符上安装pybluez包

无法在windows cmd提示符上安装pybluez包
EN

Stack Overflow用户
提问于 2022-08-11 03:06:44
回答 1查看 131关注 0票数 0

我正试图用pip install pybluez在windows上安装pybluez,但是我仍然得到同样的错误。请帮我改正这个错误。(我在windows 11上)

代码语言:javascript
复制
C:\WINDOWS\system32>pip install pybluez
Collecting pybluez
  Using cached PyBluez-0.23.tar.gz (97 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pybluez
  Building wheel for pybluez (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\ble.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\bluez.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\btcommon.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\macos.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\msbt.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\widcomm.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\__init__.py -> build\lib.win-amd64-3.10\bluetooth
      C:\Users\25ray\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.
        warnings.warn(
      Fixing build\lib.win-amd64-3.10\bluetooth\ble.py build\lib.win-amd64-3.10\bluetooth\bluez.py build\lib.win-amd64-3.10\bluetooth\btcommon.py build\lib.win-amd64-3.10\bluetooth\macos.py build\lib.win-amd64-3.10\bluetooth\msbt.py build\lib.win-amd64-3.10\bluetooth\widcomm.py build\lib.win-amd64-3.10\bluetooth\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      Fixing build\lib.win-amd64-3.10\bluetooth\ble.py build\lib.win-amd64-3.10\bluetooth\bluez.py build\lib.win-amd64-3.10\bluetooth\btcommon.py build\lib.win-amd64-3.10\bluetooth\macos.py build\lib.win-amd64-3.10\bluetooth\msbt.py build\lib.win-amd64-3.10\bluetooth\widcomm.py build\lib.win-amd64-3.10\bluetooth\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      running build_ext
      building 'bluetooth._msbt' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pybluez
  Running setup.py clean for pybluez
Failed to build pybluez
Installing collected packages: pybluez
  Running setup.py install for pybluez ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pybluez did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\ble.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\bluez.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\btcommon.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\macos.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\msbt.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\widcomm.py -> build\lib.win-amd64-3.10\bluetooth
      copying bluetooth\__init__.py -> build\lib.win-amd64-3.10\bluetooth
      C:\Users\25ray\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.
        warnings.warn(
      Fixing build\lib.win-amd64-3.10\bluetooth\ble.py build\lib.win-amd64-3.10\bluetooth\bluez.py build\lib.win-amd64-3.10\bluetooth\btcommon.py build\lib.win-amd64-3.10\bluetooth\macos.py build\lib.win-amd64-3.10\bluetooth\msbt.py build\lib.win-amd64-3.10\bluetooth\widcomm.py build\lib.win-amd64-3.10\bluetooth\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      Fixing build\lib.win-amd64-3.10\bluetooth\ble.py build\lib.win-amd64-3.10\bluetooth\bluez.py build\lib.win-amd64-3.10\bluetooth\btcommon.py build\lib.win-amd64-3.10\bluetooth\macos.py build\lib.win-amd64-3.10\bluetooth\msbt.py build\lib.win-amd64-3.10\bluetooth\widcomm.py build\lib.win-amd64-3.10\bluetooth\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      running build_ext
      building 'bluetooth._msbt' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pybluez

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-11 05:28:48

pypi上的包裹过时了。

您可以下载源代码https://github.com/pybluez/pybluez并自己构建它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73314831

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档