4

I have a PI3. I've tried installing pybluez with:

pip install pybluez

and

pip3 install pybluez

Both fail with:

Command /usr/bin/python3 -c "import setuptools, 
  tokenize;__file__='/tmp/pip-build-2yikecdn/pybluez/setup.py';
  exec(compile(getattr(tokenize, 'open', open)
  (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
  install
  --record /tmp/pip-sx4_w49r-record/install-record.txt
  --single-version-externally-managed --compile

failed with error code 1 in /tmp/pip-build-2yikecdn/pybluez

Storing debug log for failure in /home/pi/.pip/pip.log

I really need to use pybluez. Can anyone help me out?

Thanks a million!

Patrick
  • 103
  • 4
Damon
  • 41
  • 1
  • 1
  • 2

1 Answers1

17

Finally found an answer to the issue. Need to do the following to get pybluez installed on Raspberry Pi 3

sudo apt-get install libbluetooth-dev
sudo apt-get install python-dev
sudo pip install PyBluez

The first two install the appropriate header files that are missing.

Jacobm001
  • 11,904
  • 7
  • 47
  • 58
Damon
  • 171
  • 2