Jul-30-2020, 01:43 AM
You need to install the bluez module first
https://pypi.org/project/PyBluez/
pip install bluez
Keep it simple at first..
Exit IDE.
Go to command prompt, and cd to your Python main dir.
Look in /Lib/Site-Packages for the PyBluez *and* bluetooth dirs.
If not there, look in your users dir, typically under AppData/Roaming/Python for Win, and I believe /Home/.local in Linux (not in Linux now..)
Then go to a Python prompt or idle and type:
import bluetooth
If you get an error it means that there was an install problem.
Modules are normally installed with 'pip install' these days, or if using Anaconda, 'Conda install'. Pypi.org is the best place to hunt for modules.
You can install modules downloaded from git with:
python setup.py install
Also.. I've noted that some IDEs need to be configured for Python.
Among the tutorials I've seen lately (still a n00b), Jupyter and PyCharm seem to be the most popular (though I use Notepad/Gedit).
https://pypi.org/project/PyBluez/
pip install bluez
Keep it simple at first..
Exit IDE.
Go to command prompt, and cd to your Python main dir.
Look in /Lib/Site-Packages for the PyBluez *and* bluetooth dirs.
If not there, look in your users dir, typically under AppData/Roaming/Python for Win, and I believe /Home/.local in Linux (not in Linux now..)
Then go to a Python prompt or idle and type:
import bluetooth
If you get an error it means that there was an install problem.
Modules are normally installed with 'pip install' these days, or if using Anaconda, 'Conda install'. Pypi.org is the best place to hunt for modules.
You can install modules downloaded from git with:
python setup.py install
Also.. I've noted that some IDEs need to be configured for Python.
Among the tutorials I've seen lately (still a n00b), Jupyter and PyCharm seem to be the most popular (though I use Notepad/Gedit).