Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: GNUser on February 13, 2026, 12:44:33 PM
-
I'm running blueman.tcz in TCL17 x86_64.
blueman.tcz depends on py3.9gobject.tcz. If /usr/local/bin/python3 is a symlink to python3.14 (or any python3 version other than 3.9) then blueman doesn't work because the modules it needs are located in /usr/local/lib/python3.9/site-packages/blueman:
$ blueman-applet &
eileen@blaptop:~$ Traceback (most recent call last):
File "/usr/local/bin/blueman-applet", line 15, in <module>
from blueman.Functions import create_logger, create_parser, set_proc_title
ModuleNotFoundError: No module named 'blueman'
$ tce-status -i | grep python
python3.14
python3.9
python3.9-olefile
python3.9-pillow
$ sudo ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3
$ blueman-applet &
-> now it works
I've encountered this problem of /usr/local/bin/python3 not pointing to the expected python3 version several times before: Sometimes when using extensions, sometimes when building extensions.
I thought about different ways to prevent this kind of problem. One idea is to use a startup script (/usr/local/tce.installed/blueman in this case) that forces /usr/local/bin/python3 to point to the expected python3 version. This approach is risky because it would break applications that need a different python3 version.
Maybe the best solution would be for those python3 applications that depend on a specific python3 version to have a more specific shebang? So in blueman.tcz, for example, the python scripts would have #!/usr/local/bin/python3.9 shebang rather than #!/usr/local/bin/python3? That's the best solution I can think of at the moment.
-
I’ve been wondering for a while how to deal with this :-\
-
What do you think of the idea of using a more specific shebang? In the specific case of blueman.tcz, I'm suggesting replacing all occurrences of #!/usr/local/bin/python3 with #!/usr/local/bin/python3.9
EDIT: Let me test this idea and see if it works (to make sure there is no unexpected breakage if I leave /usr/local/bin/python3 pointing to /usr/local/bin/python3.14)
-
That’s not a bad idea - I’ll have a look in the next couple of days.
-
Hi Juanito. I tried my shebang idea and it works! I modified the blueman.tcz extension like this:
$ sed -i 's|#!/usr/local/bin/python3|#!/usr/local/bin/python3.9|' ./squasfs-root/usr/local/bin/*
Then I loaded the modified blueman.tcz.
Lo and behold, the extension works as expected even though /usr/local/bin/python3 is a symlink to /usr/local/bin/python3.14 :)
-
speaking of shebang's Is it more proper to do?
/usr/bin/env python3.9
-
That's a good point. Yes, using env would be more "proper" and portable.
But since we are specifically talking about packaging for the TCL repo (rather than posting the application to some distro-agnostic location), I think #!/usr/bin/env python3.9 and #!/usr/local/bin/python3.9 are more or less equally good.