Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Robin Becker

.

so obviously I need to install some version of boost libs or
Boost.Python etc etc. Gave up :(
-luddite-ly yrs-
Robin Becker


The aur repository, no ?

https://aur.archlinux.org/packages/python-exiv2/

Vincent



that would work (if I had thought hard about it), but not for a pip install which is where the fun started :), I was 
only trying to see what was going wrong.

--
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Vincent Vande Vyvre
Le 20/08/20 à 09:07, Robin Becker a écrit :
> .
>>> so obviously I need to install some version of boost libs or
>>> Boost.Python etc etc. Gave up :(
>>> -luddite-ly yrs-
>>> Robin Becker
>>>
>> The aur repository, no ?
>>
>> https://aur.archlinux.org/packages/python-exiv2/
>>
>> Vincent
>>
>
> that would work (if I had thought hard about it), but not for a pip
> install which is where the fun started :), I was only trying to see
> what was going wrong.
> -- 
> Robin Becker

See the README for the compilation instructions:
https://bazaar.launchpad.net/~vincent-vandevyvre/py3exiv2/trunk/view/head:/py3exiv2/README

Vincent

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Chris Green
Cameron Simpson  wrote:
> On 19Aug2020 08:53, Chris Green  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


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Chris Angelico
On Fri, Aug 21, 2020 at 3:21 AM Chris Green  wrote:
> 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.

That seems odd. According to packages.ubuntu.com, Focal (20.04) is
shipping Mercurial 5.3.1, and since version 5.2, Mercurial has
supported Python 2.7 or 3.5+. However, it seems that the dependencies
for the mercurial package specify python2 and no reference to python3.

https://packages.ubuntu.com/focal/mercurial

Fortunately, the *next* release of Ubuntu fixes this:

https://packages.ubuntu.com/groovy/mercurial

It depends on Python 3.8 instead. No idea why the 20.04 release insists on 2.7.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Issue

2020-08-20 Thread Sreelakshmi Madhu
not able to open IDLE
and also while running a program in cmd saved in notepad, it's showing not
found such a python file.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Chris Green
Chris Angelico  wrote:
> On Fri, Aug 21, 2020 at 3:21 AM Chris Green  wrote:
> > 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.
> 
> That seems odd. According to packages.ubuntu.com, Focal (20.04) is
> shipping Mercurial 5.3.1, and since version 5.2, Mercurial has
> supported Python 2.7 or 3.5+. However, it seems that the dependencies
> for the mercurial package specify python2 and no reference to python3.
> 
> https://packages.ubuntu.com/focal/mercurial
> 
> Fortunately, the *next* release of Ubuntu fixes this:
> 
> https://packages.ubuntu.com/groovy/mercurial
> 
> It depends on Python 3.8 instead. No idea why the 20.04 release insists on 
> 2.7.
> 
OK, so that's one less thing needing Python 2, next release. :-)

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Issue

2020-08-20 Thread dn via Python-list

On 21/08/2020 07:01, Sreelakshmi Madhu wrote:

not able to open IDLE
and also while running a program in cmd saved in notepad, it's showing not
found such a python file.



Please review the Python documentation (https://docs.python.org/3/), in 
particular the "Python Setup and Usage" notes relevant to your machine.


If you need further information, please help us to help you:
- refer to the archives of this Discussion List to see if the question 
has been asked previously

- operating system and version
- source and version of Python download
- exactly what you typed/did
- exactly what happened as a result
- use a descriptive message title that will help other beginners with 
similar problems to benefit from answers-given

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Cameron Simpson
On 20Aug2020 18:13, Chris Green  wrote:
>Cameron Simpson  wrote:
>> On 19Aug2020 08:53, Chris Green  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 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Cameron Simpson
On 21Aug2020 04:00, Chris Angelico  wrote:
>Fortunately, the *next* release of Ubuntu fixes this:
>
>https://packages.ubuntu.com/groovy/mercurial
>
>It depends on Python 3.8 instead. No idea why the 20.04 release insists 
>on 2.7.

I would guess they didn't have the resources to regression test the 
shift in time for 20.04. Moving to Python 3, _particularly_ with 
something like Mercurial which has a bunch of internal things which are 
in fact byte strings, risks subtle breakage.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Finding it very difficult to move pyexiv2 code from Python 2 to Python 3

2020-08-20 Thread Chris Angelico
On Fri, Aug 21, 2020 at 9:20 AM Cameron Simpson  wrote:
>
> On 21Aug2020 04:00, Chris Angelico  wrote:
> >Fortunately, the *next* release of Ubuntu fixes this:
> >
> >https://packages.ubuntu.com/groovy/mercurial
> >
> >It depends on Python 3.8 instead. No idea why the 20.04 release insists
> >on 2.7.
>
> I would guess they didn't have the resources to regression test the
> shift in time for 20.04. Moving to Python 3, _particularly_ with
> something like Mercurial which has a bunch of internal things which are
> in fact byte strings, risks subtle breakage.
>

I guess so, but they're packaging something that had already been
tested upstream since the *previous* minor version (at least - not
sure exactly when Py3 support came in), so I'd have thought that the
LTS Ubuntu would be the time to bring that in.

It means that Ubuntu LTS has to continue to support Python 2 from 2020
(when Python 2 exited upstream support) until 2025 or even 2030,
depending on which level of support you're looking at. In a sense,
yes, the conservative thing is to avoid making changes like that; but
ISTM that a release made in 2020 would be the correct time to make
that change.

But, I am not Canonical, I don't make these decisions.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to install your personal module/package on site.

2020-08-20 Thread Cameron Simpson
On 16Aug2020 08:32, Marco Sulla  wrote:
>Sorry, didn't read well, Apart the other suggestion, you (or your
>sysop) can create a private Pypi:
>https://pypi.org/project/private-pypi/

Even simpler, you can put a code repo path into your requirements.txt 
(or directly with pip via its "-e" option). Example from a project 
requirements.txt file:

-e 
git+https://github.com/SpectraLogic/[email protected]#egg=ds3-sdk

So if you've an work internal service for your revision control you can 
pull directly from that with pip. Note that the above example pulls a 
particular tagged release via the "@5.0.3" suffix.

Cheers,
Cameron Simpson  (formerly [email protected])
-- 
https://mail.python.org/mailman/listinfo/python-list