Python Forum
ModuleNotFoundError: No module named 'bluetooth' Error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ModuleNotFoundError: No module named 'bluetooth' Error
#1
Hi everyone, when I'm trying to run the code below, Im getting ModuleNotFoundError: No module named 'bluetooth' error and even if I pip install pybluez it doesn't solves the problem.

import bluetooth

def connect ():
bd_addr = "x:x:x:x:x:x"
port = 1
sock=bluetooth.BluetoothSocket(bluetooth.RFCOMM)
sock.connect((bd_addr, port))
sock.send("hello!!")
sock.close()

connect()

I'm using a win10 and I couldn't understand what to do about it. I tried to use setup.py but it didn't work either.
Reply
#2
Try to install the Module
pip install pybluez
Reply
#3
Firstly, thank you for your response. That was the first thing that I tried. Here is the response of the command. https://ibb.co/2yyw8Nm
Reply
#4
Windows Dependencies
Quote:PyBluez requires a C++ compiler installed on your system to build CPython modules.

For Python 3.5 or higher

Microsoft Visual C++ 14.0 standalone: Build Tools for Visual Studio 2017 (x86, x64, ARM, ARM64)
Microsoft Visual C++ 14.0 with Visual Studio 2017 (x86, x64, ARM, ARM64)
Microsoft Visual C++ 14.0 standalone: Visual C++ Build Tools 2015 (x86, x64, ARM)
Microsoft Visual C++ 14.0 with Visual Studio 2015 (x86, x64, ARM)
There are wheel here but only up to Python 3.7.
Reply
#5
Thank you now I'm looking for the microsoft visual downloads because it says error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visua...ild-tools/ on my last try. But I'm little bit confused about how to find every package because some of them directly makes me download microsoft visal studio.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  no module named 'docx' when importing docx MaartenRo 1 705 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  Problem with pymodbus - ModuleNotFoundError: No module named 'pymodbus.client.sync' stsxbel 2 22,930 Nov-02-2023, 08:20 AM
Last Post: South_east
  ModuleNotFoundError: No module named 'requests' Serg 18 2,156 Oct-29-2023, 11:33 PM
Last Post: Serg
  Resolving ImportError: No module named gdb (Python in C++) mandaxyz 3 1,307 Oct-04-2023, 02:43 PM
Last Post: mandaxyz
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,388 Aug-07-2023, 05:32 AM
Last Post: DPaul
  ModuleNotFoundError: No module named 'eyed3' Wimpy_Wellington 2 1,221 Jul-10-2023, 03:37 AM
Last Post: Wimpy_Wellington
  How to fix this error: ModuleNotFoundError: No module named 'notears' yaoyao22 2 960 Jul-09-2023, 11:24 AM
Last Post: yaoyao22
  Help with pyinstaller "No module named" korenron 9 8,182 Jun-15-2023, 12:20 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 932 May-15-2023, 02:38 PM
Last Post: tonynapoli2309
  ModuleNotFoundError: No module named 'omsdk.sdkproto' donvito7 4 1,769 Oct-20-2022, 02:56 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020