Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
import ?
#5
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).
Reply


Messages In This Thread
import ? - by anne - Jul-29-2020, 10:20 PM
RE: import ? - by Yoriz - Jul-29-2020, 10:26 PM
RE: import ? - by anne - Jul-30-2020, 12:21 AM
RE: import ? - by bowlofred - Jul-30-2020, 01:15 AM
RE: import ? - by millpond - Jul-30-2020, 01:43 AM
RE: import ? - by anne - Jul-30-2020, 03:51 AM
RE: import ? - by millpond - Jul-30-2020, 04:22 AM
RE: import ? - by elenaflorence87 - Jul-30-2020, 04:51 AM
RE: import ? - by anne - Jul-30-2020, 02:22 PM
RE: import ? - by anne - Jul-30-2020, 04:34 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020