1

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!

2
  • What does the log say? – Bex Aug 17 '17 at 9:05
  • What does sudo pip3 install pybluez do? What's in /home/pi/.pip/pip.log? – Dougie Feb 6 '20 at 13:27
13

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.

1
  • 2
    Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Feb 6 '20 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.