Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: rhermsen on February 23, 2019, 10:54:13 AM
-
I suspect I run into a similar issue like here http://forum.tinycorelinux.net/index.php/topic,21844.0.html
but now with Python.
I'm using TCL10.0 (x86) with Python2.7 installed.
I'm trying to make use of a python script, which has as header #!/usr/bin/python.
$ sudo /usr/local/etc/init.d/frr reload
Applying only incremental changes to running configuration from frr.conf
/usr/local/etc/init.d/frr: /usr/local/sbin/frr-reload.py: /usr/bin/python: bad interpreter: No such file or directory
$
Python is installed, and if I change the header to #!/usr/local/bin/python the script is working.
I hope someone can confirm this, and maybe even solve it?
-
Hi rhermsen
The tce.installed script for python used to contain the following line:
ln -sf /usr/local/bin/python2.7 /usr/bin/python
I think extensions are basically supposed to install under /usr/local/ rather than /usr/ so the removal of that link command may
have been intentional.
-
In other distros, there was a lot of confusion over which python should be linked as "python", ver 2 or ver 3. Not sure if that's related.
-
The convention is for tinycore extensions to be compiled to /usr/local
This means that perl and python scripts need to reference /usr/local/bin/perl or /usr/local/bin/python
Alternatively, "/usr/bin/env perl" or "/usr/bin/env python" can be used.
In the case of python, the python(-2.7.x) extension contains /usr/local/bin/python, but the python3.6(.x) extension does not. This is done in order to avoid accidently using the python3.6 extension if it was loaded before the python extension.
If you want to sure of which version of python is used, it is better to use /usr/local/bin/python2.7 or /usr/local/bin/python3.6