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

ModuleNotFoundError: No module named 'blueman' #873

Closed
1 task done
krichter722 opened this issue May 3, 2018 · 7 comments
Closed
1 task done

ModuleNotFoundError: No module named 'blueman' #873

krichter722 opened this issue May 3, 2018 · 7 comments
Labels

Comments

@krichter722
Copy link

krichter722 commented May 3, 2018

blueman: 2.1.alpha2-80-gc67ae920
BlueZ: 5.48-0ubuntu3
Distribution: Ubuntu 18.04
Desktop environment: MATE

ℹ Please use some service like Pastebin or GitHub Gist to post your logs and keep the thread clean and readable. Make sure to describe the exact steps you took when producing it.

After a source installation with ./autogen.sh && ./configure && make && sudo make install invoking blueman-manager fails due to

Traceback (most recent call last):
  File "/usr/local/bin/blueman-manager", line 18, in <module>
    from blueman.main.Manager import Blueman
ModuleNotFoundError: No module named 'blueman'

The system package blueman has been removed. Other ImportErrors can be found at https://travis-ci.org/krichter722/blueman/jobs/374330197 (I do not suggest to run blueman-manager inside Travis, it's just a demonstration of import errors). This might indicate that more test coverage on the CI service is needed.

@cschramm
Copy link
Member

cschramm commented May 3, 2018

Debian's (and thus probably Ubuntu's) system python version does not include any site-packages path in sys.path by default, so the module does not get picked up from the path you're installing it into (probably /usr/local/lib/python3.6/site-packages). You can either add the path when running (PYTHONPATH=/usr/local/lib/python3.6/site-packages) or install as a package letting debhelper change things from site-packages to dist-packages. (edit: or see two comments below)

I'm not aware of straightforward way to let make install put the module into /usr/lib/python3/dist-packages (for obvious reasons).

@cschramm
Copy link
Member

cschramm commented May 3, 2018

By the way: ./autogen.sh && ./configure does not make much sense as autogen.sh by default invokes configure.

@cschramm
Copy link
Member

cschramm commented May 3, 2018

There's another way: If ~/.local/lib/python3.6/site-packages does exist, it gets added to the path, so configuring the respective prefix (~/.local) to install it there should make things work out of the box.

@infirit
Copy link
Contributor

infirit commented May 3, 2018

Even if you solve instalation there is nothing to be gained by running blueman-manager under travis. Travis does not have a bluetooth device and also it would block forever as we can not interact with it. If you are interested time is best spend getting test added to blueman, see #43

@krichter722
Copy link
Author

Even if you solve instalation there is nothing to be gained by running blueman-manager under travis.

This is just a demonstration of import errors. I didn't want to suggest to run blueman-manager inside Travis and hope I didn't.

@cschramm
Copy link
Member

cschramm commented May 3, 2018

I can confirm that --prefix="$HOME/.local" --datadir="/usr/share" results in an installation that works fine with the system's python on Debian.

Edit: Not really

@philippludwig
Copy link

Yeah this should go definitely into the readme that you need to pass --prefix=/usr to get a working installation.

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

No branches or pull requests

4 participants