Closed zyf0330 closed 5 years ago
That is weird. Can you do:
ls -l /usr/lib/python3/dist-packages/indicator_sound_switcher/
-rw-r--r-- 1 root root 4841 Nov 3 17:34 card.py
-rw-r--r-- 1 root root 3689 Nov 3 17:34 config.py
-rw-r--r-- 1 root root 48677 Nov 3 17:34 indicator.py
-rw-r--r-- 1 root root 0 Oct 5 2016 __init__.py
-rw-r--r-- 1 root root 121740 Oct 5 2016 lib_pulseaudio.py
-rw-r--r-- 1 root root 4490 Nov 3 17:34 port.py
-rw-r--r-- 1 root root 24662 Nov 3 17:34 prefs.glade
-rw-r--r-- 1 root root 13834 Nov 3 17:34 prefs.py
drwxr-xr-x 2 root root 4096 Jan 18 11:41 __pycache__
-rw-r--r-- 1 root root 1764 Nov 3 17:34 stream.py
-rw-r--r-- 1 root root 968 Nov 3 17:34 utils.py
This is results
And if you run:
python3 -c 'import sys; print(sys.path)'
What does it show?
Then also try:
python3 -c 'import indicator_sound_switcher'
First shows
['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/zyf/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/home/zyf/app/onedrived-dev', '/usr/lib/python3/dist-packages']
Second shows nothing and exitcode is 0.
This is entirely correct and expected. And it means Python can perfectly import the indicator_sound_switcher
library. So I have no clue what goes wrong there. I can only suggest completely removing (make sure that /usr/lib/python3/dist-packages/indicator_sound_switcher
doesn't exist) and reinstalling the app.
It seems good now.
I install it by apt method. It gives error