pybluez installation errors on Mac OS

前端 未结 2 1761
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-20 14:48

I tried to install pybluez using following commands.

pip install pybluez

sudo easy_install pybluez

But for both commands I en

相关标签:
2条回答
  • 2021-02-20 15:12

    It appears that the releases on PyPI are very outdated, but using the latest from the GitHub repository works perfectly.

    Shell / Command Line

    $ pip install git+https://github.com/pybluez/pybluez.git
    

    requirements.txt

    git+https://github.com/pybluez/pybluez.git
    

    My Environment

    • 2018 MacBook Pro
    • Python 3.7.4
    • MacOS Mojave (10.14.6)
    0 讨论(0)
  • 2021-02-20 15:28

    PyBluez is only for PC. Try lightblue

    Download and install the master distribution: https://github.com/postskolkovo/lightblue-0.4

    cd ~/Downloads/lightblue-0.4-master
    sudo python setup.py install
    

    If you get the error:

    Check dependencies
    No architectures to compile for (ARCHS=$(NATIVE_ARCH_ACTUAL), VALID_ARCHS=i386 x86_64).
    
    ** INSTALL FAILED **
    

    you'll have to open up setup.py and change:

    os.system("xcodebuild install -arch '$(NATIVE_ARCH_ACTUAL)' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
    

    to:

    os.system("xcodebuild install -arch 'i386' -target LightAquaBlue -configuration Release DSTROOT=/ INSTALL_PATH=/Library/Frameworks DEPLOYMENT_LOCATION=YES")
    

    via this discussion

    0 讨论(0)
提交回复
热议问题