[petsc-dev] Configure won't find python

Satish Balay balay at mcs.anl.gov
Sat Apr 18 11:48:29 CDT 2020


On Sat, 18 Apr 2020, Satish Balay via petsc-dev wrote:

> On Sat, 18 Apr 2020, Satish Balay via petsc-dev wrote:
> 
> > On Sat, 18 Apr 2020, Satish Balay via petsc-dev wrote:
> > 
> > > On Sat, 18 Apr 2020, Jed Brown wrote:
> > > 
> > > > Satish Balay <balay at mcs.anl.gov> writes:
> > > > 
> > > > > On Sat, 18 Apr 2020, Satish Balay via petsc-dev wrote:
> > > > >
> > > > >> On Sat, 18 Apr 2020, Jed Brown wrote:
> > > > >> 
> > > > >> > Satish Balay <balay at mcs.anl.gov> writes:
> > > > >> > 
> > > > >> > > Sure - the initial premise of this thread [as I understood] was: /usr/bin/python is python2. On python3 only installs - there is no /usr/bin/python (for ex: jedbrown/mpich-ccache docker file) - so we need to fix this issue in configure.
> > > > >> > >
> > > > >> > > I'm guessing that most installs will have  /usr/bin/python as python2 or python3 - so missing /usr/bin/python is a smaller problem. Its not clear to me why this is missing in jedbrown/mpich-ccache - and how many OSes or distro will default to this mode.
> > > > >> > 
> > > > >> > On Debian and Ubuntu, /usr/bin/python is part of python2; it isn't created if you `apt install python3`.
> > > > >> 
> > > > >> Ok - that a large userbase.
> > > > >> 
> > > > >> So when python2 deprecated in debian - there won't be /usr/bin/python anymore?
> > > > >
> > > > > Also - debian does alternatives - don't know if they can setup a default python [python2 vs python3] through this mechanism - and have anyone installed as default.
> > > > >
> > > > > [for ex: I think if openmpi is installed /usr/bin/mpicc is automatically setup as default via /etc/alternatives. I don't know if the same happens for mpich]
> > > > 
> > > > Alternatives is meant for compatible implementations.  Python2 and Python3 are not, so I doubt they will ever do that.
> > > > 
> > > > This indicates that /usr/bin/python will not exist in the next release.
> > > > 
> > > > https://wiki.debian.org/Python/2Removal
> > > > 
> > > > I don't know what exactly that means.  I'd guess it means one will need
> > > > to use backports to get python2 if one really needs it; even so, I don't
> > > > know if /usr/bin/python will exist.  Perhaps only /usr/bin/python2.
> > > > 
> > > > 
> > > > I don't know if they'll reintroduce /usr/bin/python at some release well
> > > > in the future, but we should expect for it to not exist for a while.
> > > > 
> > > 
> > > The above URL is about packaging guidelines. i.e the packages in the distro should correctly use python2 or python3 dependencies.
> > > 
> > > I don't see a mention of /usr/bin/python will be. [so yes - so we don't know what it will be - when python3 becomes the default]
> > > 
> > > But until then - I don't consider missing /usr/bin/python a transition. jedbrown/mpich-ccache would be an example of user willfully not installing the default system python. (similar to not installing system default compilers). So don't think its a case of configure bug of not handling proper installs. [sure we have work-around for buggy compilers and some buggy installs so any support for missing /usr/bin/python  would be on that side].
> > > 
> > > I wonder what python folk recommendation here is wrt dual use scripts..
> > 
> > The OSes that already migrated to python3 as default [Fedora - that I use, Arch? that Jed uses] do provide /usr/bin/python - which is python3.
> > 
> > So - hopefully Debian/Ubuntu will stick to this trend [assuming they haven't yet switched the default].
> 
> https://askubuntu.com/questions/1224695/python-is-not-installable-on-ubuntu-20-04
> https://askubuntu.com/questions/1224695/python-is-not-installable-on-ubuntu-20-04
> 
> Looks like one needs to install "python-is-python3" or "python-is-python2-but-deprecated" package to get /usr/bin/python

balay at sb /home/balay
$ rpm -qf /usr/bin/python
python-unversioned-command-3.7.6-2.fc31.noarch
balay at sb /home/balay
$ rpm -ql python-unversioned-command-3.7.6-2.fc31.noarch
/usr/bin/python
/usr/share/man/man1/python.1.gz
balay at sb /home/balay
$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 30 03:18 /usr/bin/python -> ./python3*
balay at sb /home/balay
$ 

So Fedora has similar package organization.

So the unknown wrt Ubuntu-20.04 is - will python-is-python3 be installed by default [atleast in workstation installs] similar to Fedora.

I'm hesitating to download the Beta iso - and give it a spin...

Satish


More information about the petsc-dev mailing list