Code: Select all
/usr/bin/env: ‘python’: No such file or directoryThank you
Code: Select all
/usr/bin/env: ‘python’: No such file or directoryCode: Select all
#!/usr/bin/pythonCode: Select all
#!/usr/bin/python3
python-is-python2 or python-is-python3 depending on your needs. These packages are mutually exclusive but create the appropriate symlink.Unfortunately these are scripts that I maintain and that should be compatible with both python 2 and 3, so I can't assume python2 or python3 as default. I ended up linking python 3 as the default, but I wanted to know if there is a proper way of doing it as it could break some installation or assumption about the absence of that link.corkie wrote: ⤴Sun Jul 26, 2020 8:57 am I'm in the same boat.
Just to confuse things further there are folders named python and python3 in /usr/share/ with lots of similar complicated looking stuff in them. So maybe you have separate executables for both python and python3 in mint 20. There is nothing there for python 2 so I expect scripts looking for 2 get directed to python 3 executables by some magic I don't understand.
You could do the same for your python scripts. Just change the script in your /usr/local/bin/'broken_thing' folder to point to python3.
i.e. change the linetoCode: Select all
#!/usr/bin/pythonIf that doesn't go well you are back to replacing /usr/bin/python so the script can use the old executables.Code: Select all
#!/usr/bin/python3
Thanks for the very useful piece of information. Installing python-is-python3 solved the issue, but interestingly the release notes state that /usr/bin/python is left untouched on upgrades and only fresh installations come without it. I'll mark the question as solved, because of these notes I still wonder if there is something wrong about the Mint upgrade tool.smurphos wrote: ⤴Sun Jul 26, 2020 9:11 am Hi - take a look at the Focal release notes - https://wiki.ubuntu.com/FocalFossa/Rele ... by_default
The section on upgraded systems is specific to Ubuntu upgrades not Mint.
If you want to avoid updating your own python scripts you can install eitherpython-is-python2orpython-is-python3depending on your needs. These packages are mutually exclusive but create the appropriate symlink.