IanHarvey / bluepy

Python interface to Bluetooth LE on Linux
Other
1.61k stars 490 forks source link

ImportError: No module named btle #294

Closed mazhenlong closed 6 years ago

mazhenlong commented 6 years ago

Hi, when I input from bluepy.btle import Characteristic , it returns ImportError: No module named btle. I tried python 2.7 and 3.5, the same problem. And I have tried the solution of #112 , it doesn't work.

PrzemoF commented 6 years ago

Can you post the result of: import pip ; sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()]) It's all in one line.

mazhenlong commented 6 years ago

Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'get_installed_distributions' @PrzemoF

PrzemoF commented 6 years ago

Do you have pip installed? What system do you use? How did you install bluepy?

mazhenlong commented 6 years ago

I have installed pip. Ubuntu. Installed by source files.

PrzemoF commented 6 years ago

From source files, so you did something like this? git clone https://github.com/IanHarvey/bluepy.git sudo python setup.py install

Please post output of: find /usr -name "bluepy"

tom-hooper commented 3 years ago

I had the same issue. something wrong with the installer in pip I ended up running sudo python3 setup.py install to get it to put the files in the right path.

output for find /usr -name "bluepy" /usr/local/lib/python3.6/dist-packages/bluepy-1.3.0-py3.6.egg/bluepy

this was a real pain in the ass to find. pip stuffed up the installs.

McMacaron commented 2 years ago

sudo python setup.py install

Absolutely do not understand what you are talking about. But I have the same issue.