8

I have successfully connected my cell phone to the Raspberry Pi's onboard bluetooth. I know the Bluetooth works, but I cannot get import bluetooth to work properly.

I get this error when I run the script:

Traceback (most recent call last):
  File "/home/pi/filename.py", line 1, in <module>
    import bluetooth 
ImportError: No module named 'Bluetooth'

How do I fix this, or what do I need to do to make this work?

Jacobm001
  • 11,797
  • 7
  • 45
  • 56
Kyle Bradley
  • 81
  • 1
  • 1
  • 4

1 Answers1

8

You need to install bluetooth library

sudo apt-get update
sudo apt-get install bluetooth bluez libbluetooth-dev
sudo python3 -m pip install pybluez

and try again your code.

Regards

Edit: Answer's source was broken, so deleted

ahmetertem
  • 414
  • 1
  • 5
  • 18