Finding it very difficult to move pyexiv2 code from Python 2 to Python 3
Cameron Simpson
cs at cskk.id.au
Thu Aug 20 19:16:50 EDT 2020
On 20Aug2020 18:13, Chris Green <cl at isbd.net> wrote:
>Cameron Simpson <cs at cskk.id.au> wrote:
>> On 19Aug2020 08:53, Chris Green <cl at isbd.net> wrote:
>> >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.
I run Mercurial 5.5 with Python 3. Admittedly because I went "pip3
install mercurial" to put it in my personal py 3 venv. However I
recommend this anyway!
Uninstall the system mercurial if you don't need it elsewhere - it will
remove a python 2 dependency.
>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.
% which hg
/Users/cameron/var/venv/3/bin/hg
>So Python 2 stays for the moment.
I recommend putting a little more work to further reducing your py 2
dependence - it will help in the medium term.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Python-list
mailing list