linuxmint / blueberry

A Bluetooth configuration tool
GNU General Public License v3.0
171 stars 51 forks source link

ModuleNotFound: gi #96

Closed niwla23 closed 4 years ago

niwla23 commented 4 years ago

Hi, I am getting a module not found error for gi. I tried doing apt install python3-gi, but it said its already installed. The error appears directly when starting blueberry What can I do?

leigh123linux commented 4 years ago

Have you installed a non system provided python version?

niwla23 commented 4 years ago

no, not that i know

leigh123linux commented 4 years ago

Can you post

python3
import gi
niwla23 commented 4 years ago
>>> import gi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gi'
leigh123linux commented 4 years ago

@Niwla23 Your python3 installation is busted, post

alternatives --list |grep python
niwla23 commented 4 years ago

@leigh123linux Command does not exist. Do you mean galternatives?

mtwebster commented 4 years ago

What distro is this?

What does which python3 return?

then, ls -la /usr/bin/python3*

and, lastly ls -laR /usr/local

niwla23 commented 4 years ago

which python3 /usr/local/bin/python3

ls -la /usr/bin/python3*

lrwxrwxrwx 1 root root       9 Okt 25  2018 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 4526456 Nov  7 11:44 /usr/bin/python3.6
lrwxrwxrwx 1 root root      33 Nov  7 11:44 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
-rwxr-xr-x 2 root root 4526456 Nov  7 11:44 /usr/bin/python3.6m
lrwxrwxrwx 1 root root      34 Nov  7 11:44 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
lrwxrwxrwx 1 root root      16 Okt 25  2018 /usr/bin/python3-config -> python3.6-config
lrwxrwxrwx 1 root root      10 Okt 25  2018 /usr/bin/python3m -> python3.6m
lrwxrwxrwx 1 root root      17 Okt 25  2018 /usr/bin/python3m-config -> python3.6m-config

ls -laR /usr/local You dont want to see output, its over 300 lines of output

I am using Linux Mint 19.3

leigh123linux commented 4 years ago

Removing /usr/local/bin/python3 will fix the issue

mtwebster commented 4 years ago

I did want to see, there should be very little in there (you could use something like dpaste). But if what @leigh123linux suggests fixes things, I suppose it's ok.

If you discover any other broken things in your system, that's the first place i'd look :)

niwla23 commented 4 years ago

Removing /usr/local/bin/python3 will fix the issue

Wont that delete python?

leigh123linux commented 4 years ago

Removing /usr/local/bin/python3 will fix the issue

Wont that delete python?

Only the local copy, system python should take over once it's deleted, env prefers local so overrides system python.

The output you posted shows system python is present.

lrwxrwxrwx 1 root root       9 Okt 25  2018 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 4526456 Nov  7 11:44 /usr/bin/python3.6

I suspect some third-party app installed the locale python copy.

niwla23 commented 4 years ago

Yay, thank you, working now