Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no module named btle #197

Closed
sdy1130 opened this issue Jun 13, 2017 · 5 comments
Closed

no module named btle #197

sdy1130 opened this issue Jun 13, 2017 · 5 comments

Comments

@sdy1130
Copy link

sdy1130 commented Jun 13, 2017

screen shot 2017-06-13 at 4 50 53 pm

I installed this library as instructed and I get this error when I run the same code...

@sdy1130 sdy1130 changed the title not module named btle no module named btle Jun 13, 2017
@PrzemoF
Copy link
Contributor

PrzemoF commented Jun 14, 2017

pip or local build? Did you try import bluepy.btle ?
Also you can always try to use your distro reporitory to install bluepy.

@IanHarvey
Copy link
Owner

If you installed the library with pip, the recommended way is:

from bluepy import btle

Does this work for you? Maybe the documentation needs updating to make this clear.

@g2kokaro
Copy link

I am having the same issue. I'm running Ubuntu 18.04 with Python 3.6.5. I've tried installing via pip3 both with and without sudo and installing from source.
image

@willm1001
Copy link

willm1001 commented Aug 17, 2018

If you have the bluepy source directory in the same directory as the python file that is calling bluepy, delete, move, or rename it. I git cloned the bluepy source to my home directory and also had created my python test file in my home directory and it caused this problem. Once I removed the bluepy source directory, I was able to call bluepy without issue.

Further info:
You will need libglib2.0-dev for the glib.h requirement...

sudo apt-get install libglib2.0-dev
wget <path to bluepy source tarball, get from the download link>
tar -xzvf bluepy-1.0.5.tar.gz
cd bluepy-1.0.5
sudo python3 setup.py build
sudo python3 setup.py install

@JamalMuhammad
Copy link

from bluepy import btle
from bluepy import sensortag (from bluepy.bluepy import sensortag won't work!)

if you have been doing the example from Orestis from github (before coming to this example) make sure to change the name of file (sensortag.py) of this example to something else. This can create issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants