0

With Mac OS Ver 10.13.1 and Python 3.6:

I have installed Python with a success, but when I input sudo pip3 install pybluez in the terminal.app.The result is as follows:

The warning and error info. log : (1) Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-01oswgn6/pybluez/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ekqpt5n6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-01oswgn6/pybluez/

(2)Failed building wheel for pybluez (3)The directory '/Users/ringo/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Then I googled and re-input the following command: sudo -H pip3 install pbluez,and 2 errors are : (1)Failed building wheel for pybluez (2)Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-krv0pwmm/pybluez/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-38mly9ts-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-krv0pwmm/pybluez/

I have googled and no effective ways to the issue.Any one has any idea about it is appreciated.

Ringo
  • 1,173
  • 1
  • 12
  • 25

1 Answers1

0

Bluez is the "official Linux Bluetooth protocol stack", i.e., not meant for macOS.

If you want to develop a Bluetooth application for macOS target, check https://developer.apple.com/bluetooth/

Daniel Santos
  • 881
  • 2
  • 9
  • 17
  • 1
    I have installed the package `pybluez` with success before, but due to the version of the mac os (mac OS Hight Sierra),there's something wrong when I use this package to scan the nearby devices. – Ringo Jan 18 '18 at 06:15