You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use bluepy, my code has worked before but now i have an error.
I use "import bluepy.btle as btle"
I have setup a new Raspberry Pi3 , installed bluepy with "pip3 install bluepy", but when i try to launch my python script, I have an error that say "no module named bluepy.btle". I've tried to reinstall bluepy, but it's the same error.
So i have tried ''import bluepy as btle" , it works but now i have an other error which is "bluepy has no attribute 'DefaultDelegate'"
Do someone has the same problem ? It seems that bluepy is not installed correctly, or something like that.
Thanks for your answers, and sorry for my poor english.
The text was updated successfully, but these errors were encountered:
It looks like python is unable to find the module files. Not much to do with the library itself.
Try:
import sys
print(sys.path)
To see the paths where the interpreter is looking for the bluepy library. There should be an entry like this leading to the bluepy module files 'btle.py' (at least on my Pi):
/usr/local/lib/python3.9/dist-packages/bluepy-1.3.0-py3.9.egg/bluepy
If you find your bluepy installation directory and add it to sys.path you will be able to do e.g. ''from bluepy.btle import Scanner".
the issue is with installations, lke if you install bluepy by sudo and try to find link of the just python then you do not find bluepy.
when you use sudo python then you will find bluepy.
i say bluepy is king of sudo library which direct intract with hardware interface with bluez so install with sudo and use with sudo python.
You can also use without sudo means install and run without sudo but in restriced permission device you will face some issues.
i recommend to use with sudo.
Hi everyone,
I try to use bluepy, my code has worked before but now i have an error.
I use "import bluepy.btle as btle"
I have setup a new Raspberry Pi3 , installed bluepy with "pip3 install bluepy", but when i try to launch my python script, I have an error that say "no module named bluepy.btle". I've tried to reinstall bluepy, but it's the same error.
So i have tried ''import bluepy as btle" , it works but now i have an other error which is "bluepy has no attribute 'DefaultDelegate'"
Do someone has the same problem ? It seems that bluepy is not installed correctly, or something like that.
Thanks for your answers, and sorry for my poor english.
The text was updated successfully, but these errors were encountered: