Cameron Simpson <c...@cskk.id.au> wrote: > On 19Aug2020 08:53, Chris Green <c...@isbd.net> wrote: > >I have quite a lot of things installed with pip, however I've never > >had this problem with dependencies before. Adding to the fun is that > >my system has still got Python 2 as the default Python so I have to > >run pip3 explicitly to get Python 3 code. > > My approach to this is to have a personal venv based on a modern Python3 > and put its bin near the front of my $PATH. The pip and python come from > it. But I tend to type "pip3" anyway - still the pip from my venv. > > >Maybe I should bite the bullet and make Python 3 the default Python > >and see what falls over as a consequence. > > Don't change the system default Python - many system scripts rely on > that and may break. If an OS update changes it, it should also update > all the dependent scripts and so be ok, but an ad hoc change of only > part of the system is asking for trouble. > It's actually more subtle and complicated than the OS changing or not changing the default Python version. There are quite a lot of questions about exactly this on the Ubuntu lists. All the OS python code in Ubuntu 20.04 is now Python 3 but there are some other things which I have installed (such as Mercurial) which still depend on Python 2. One can see what is affected by doing:-
$ sudo apt remove python2 --simulate This shows a mixture of old (and no longer needed) libraries that would go with Python 2 but it also shows some things like Mercurial that I need. So Python 2 stays for the moment. -- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list