eliasweingaertner / peripage-A6-bluetooth

Directly printing on a Peripage A6 thermal printer via Bluetooth
MIT License
68 stars 11 forks source link

Error building pybluez #12

Open mariavd opened 2 weeks ago

mariavd commented 2 weeks ago

I have Python 3.10.2 on Windows. Do you have a suggestion why the package pybluez doesn't work?

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
  ╰─> [15 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\__init__.py -> build\lib.win-amd64-3.10\bluetooth
      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: webencodings, tqdm, tinycss2, pycparser, pybluez, Pillow, defusedxml, colorama, qrcode, cssselect2, cffi, cairocffi, cairosvg
  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
  ╰─> [15 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\__init__.py -> build\lib.win-amd64-3.10\bluetooth
      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.

[notice] A new release of pip available: 22.3.1 -> 24.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip

F:\peripage-A6-bluetooth>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (22.3.1)
Collecting pip
  Downloading pip-24.1.1-py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 11.6 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed pip-24.1.1

F:\peripage-A6-bluetooth>pip install -r requirements.txt
Collecting pybluez (from -r requirements.txt (line 1))
  Cloning https://github.com/pybluez/pybluez.git to c:\users\suzanka\appdata\local\temp\pip-install-227rigfg\pybluez_317db7e454ef41b2b2efa42cab6ba32e
  Running command git clone --filter=blob:none --quiet https://github.com/pybluez/pybluez.git 'C:\Users\suzanka\AppData\Local\Temp\pip-install-227rigfg\pybluez_317db7e454ef41b2b2efa42cab6ba32e'
  Resolved https://github.com/pybluez/pybluez.git to commit 82cbba8a1ebd4c1e3442dfafd8581d58c50fa39e
  Preparing metadata (setup.py) ... done
Requirement already satisfied: tqdm==4.59.0 in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (4.59.0)
Collecting Pillow==9.4.0 (from -r requirements.txt (line 3))
  Downloading Pillow-9.4.0-cp310-cp310-win_amd64.whl.metadata (9.4 kB)
Collecting qrcode==6.1 (from -r requirements.txt (line 4))
  Downloading qrcode-6.1-py2.py3-none-any.whl.metadata (11 kB)
Collecting cairosvg==2.5.2 (from -r requirements.txt (line 5))
  Downloading CairoSVG-2.5.2-py3-none-any.whl.metadata (2.7 kB)
Requirement already satisfied: six in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (from qrcode==6.1->-r requirements.txt (line 4)) (1.16.0)
Collecting colorama (from qrcode==6.1->-r requirements.txt (line 4))
  Downloading colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting cairocffi (from cairosvg==2.5.2->-r requirements.txt (line 5))
  Downloading cairocffi-1.7.1-py3-none-any.whl.metadata (3.3 kB)
Collecting cssselect2 (from cairosvg==2.5.2->-r requirements.txt (line 5))
  Downloading cssselect2-0.7.0-py3-none-any.whl.metadata (2.9 kB)
Collecting defusedxml (from cairosvg==2.5.2->-r requirements.txt (line 5))
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl.metadata (32 kB)
Requirement already satisfied: tinycss2 in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (from cairosvg==2.5.2->-r requirements.txt (line 5)) (1.3.0)
Collecting cffi>=1.1.0 (from cairocffi->cairosvg==2.5.2->-r requirements.txt (line 5))
  Downloading cffi-1.16.0-cp310-cp310-win_amd64.whl.metadata (1.5 kB)
Requirement already satisfied: webencodings in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (from cssselect2->cairosvg==2.5.2->-r requirements.txt (line 5)) (0.5.1)
Requirement already satisfied: pycparser in c:\users\suzanka\appdata\local\programs\python\python310\lib\site-packages (from cffi>=1.1.0->cairocffi->cairosvg==2.5.2->-r requirements.txt (line 5)) (2.22)
Downloading Pillow-9.4.0-cp310-cp310-win_amd64.whl (2.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 12.1 MB/s eta 0:00:00
Downloading qrcode-6.1-py2.py3-none-any.whl (31 kB)
Downloading CairoSVG-2.5.2-py3-none-any.whl (45 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.8/45.8 kB 2.2 MB/s eta 0:00:00
Downloading cairocffi-1.7.1-py3-none-any.whl (75 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.6/75.6 kB 4.1 MB/s eta 0:00:00
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Downloading cffi-1.16.0-cp310-cp310-win_amd64.whl (181 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.6/181.6 kB 5.5 MB/s eta 0:00:00
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
  ╰─> [15 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\__init__.py -> build\lib.win-amd64-3.10\bluetooth
      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
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pybluez)