Brian,

Great diagnostics procedures. Thanks.

Kurt

On Thu, Mar 4, 2021, at 2:02 AM, Brian K. White wrote:
> On 3/3/21 1:50 PM, Peter Vollan wrote:
> > FYI my problem persists, despite installing python 3.5
> 
> I haven't seen an answer to either mine or others questions that would 
> nail down that the the installed 3.5 is actually what the script is 
> using. Merely installing a package doesn't guarantee anything.
> 
> You're symptoms are unusual, and so it needs debugging on your end if 
> you want it to work. You have to investigate and verify things that are 
> usually just assumed and handled automatically.
> 
> When you type "mcomm" is it really running the file you and I and 
> everyone assumes it is?
> 
> $ which mcomm
> /usr/bin/mcomm
> 
> ok good, next, look at that file. The problem sytax occurs right in that 
> file, not later in the real program file, so *that* file needs to be 
> executed by a python 3.5 or later executable.
> 
> And that file is executed by whatever is on it's shebang line, which is 
> "/usr/bin/python3", point being, not just "python3", so, you can verify 
> the interpreter for that file a couple different ways. You can look at 
> "/usr/bin/python3",
> 
> $ ls -l /usr/bin/python3
> lrwxrwxrwx 1 root root 9 Oct  6 06:28 /usr/bin/python3 -> python3.8
> 
> $ /usr/bin/python3 --version
> Python 3.8.6
> 
> 
> Or you could also add a print statement to show the python version.
> Insert this line after the import lines and before the subprocess.call() 
> line:
> 
> print(sys.version)
> 
> 
> 
> Or, better yet, the problem syntax occurs right in the top level wrapper 
> script, and that entire line really isn't necessary, the entire script 
> doesn't even need to be python. You could replace the entire contents 
> with this simpler sh version:
> 
> #!/bin/sh
> exec python3 /usr/share/mcomm/mcomm.py "$@"
> 
> What happens when you do that?
> 
> -- 
> bkw
> 

Reply via email to