Menpo and Python 3

265 views
Skip to first unread message

James Booth

unread,
Dec 1, 2016, 3:23:06 AM12/1/16
to Menpo Users

Hi all,


As I hope many of you are aware all of Menpo has had Python 3 support for a while now, and in fact nearly everyone using Menpo internally at Imperial is using Python 3.


Recently, Patrick and I raised an issue to discuss whether we should support the Python 3 2020 statement, which basically commits projects to dropping support for Python 2 by 2020:

https://github.com/menpo/menpo/issues/721


We note that influential projects like IPython are already signed up to this pledge, so hopefully it isn't too controversial for Menpo to take the pledge too (but do let us know if you disagree!)


As we internally already use Python 3 extensively, and given the specialist nature of our project, we could consider moving to Python 3 exclusively before that deadline. It would simplify and improve Menpo in a number of ways:

  1. We would half the number of conda builds we have to generate (and half the load on our CI servers)
  2. We could move to use new Python 3 syntax like the `@` dot product symbol.
  3. We could consider adding type annotations to the parts of Menpo where it makes sense to, which would improve coding assistance in IDE's considerably
  4. We could simplify some dependencies, removing Python 2.7 back ports of stuff we already use
  5. We could simplify the code base, removing __future__ imports and object superclasses, have tidier super calls, and use pathlib.Path objects in std. library functions directly (3.6+ only for that one).
  6. We could move to use pickle protocol 4 by default for faster smaller pickles that work better with large numpy arrays.

Outside of those benefits, it would be plain exciting every year to have new language-level features and improvements that we can *consider* supporting. Python 2.7 is never going to improve. Python 3 is, and every year, little nips and tucks (like those listed above) would sand off rough edges over the whole codebase and make it more reliable and solid for newcomers and experienced users alike.


Given the above, we would like to hear from external users of Menpo about their choice of Python version. If Menpo was Python 3 only, would that have stopped you fro using it? Did you start using Python recently and elect to use Python 2? If so, why? Feel free to respond to this thread with any thoughts to help us on this.


Cheers

James

Message has been deleted

James Booth

unread,
Jan 23, 2017, 4:03:24 AM1/23/17
to Mathew Sam, Menpo Users
Hi Matthew,

 I tried installing menpo on ubuntu but I am having some library issues with python 3.6

Presently, Python 3.6 conda builds of Menpo are not provided - if possible I would recommend using Python 3.5 instead.

If you really need Python 3.6 you could pip install menpo, but you will have a hard time getting dependencies right (especially if you need menpodetect/menpofit/menpo3d).

Patrick and myself have discussed adding 3.6 support - it's not difficult, just time-consuming to bump all of our projects and dependencies.

I'll start taking a look at this (I'm also keen to start playing with the new toys in 3.6!)

Best wishes
James



On 22 January 2017 at 07:38, Mathew Sam <pmath...@gmail.com> wrote:
Sir,
    Has there any updates regarding the python 3.6? I tried installing menpo on ubuntu but I am having some library issues with python 3.6 . I followed the instructions on the menpo website for beginners installing menpo on linux.  

--
You received this message because you are subscribed to the Google Groups "Menpo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to menpo-users+unsubscribe@googlegroups.com.
To post to this group, send email to menpo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/menpo-users/b1d25ce8-3bee-406b-b465-71237a5a87fa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

James Booth

unread,
Jan 24, 2017, 6:24:29 AM1/24/17
to Mathew Sam, Menpo Users
Hi Matthew,

Please ensure you respond to Menpo Users so it goes onto the mailing list!

Just a heads up in that case. The instructions on the menpo website for installing menpo require setting up the environment. In this stage the environment downloads and installs python 3.6 in the environment.

That's a good catch, thanks! Will try and fix this ASAP. 

If you don't mind could you change the install instructions so that it continues with python 3.5?

Try 

> conda create -n menpo35 python=3.5
> source activate menpo35
(menpo35) > conda install -c menpo menpoproject


> The older install with python3.5 still works beautifully, but when I tried installing menpo in a new system, though the installation goes without a hitch, there are issues when I try to run codes. 

I'm confused by this - so the installation works? Can you post complete logs for the issues you are seeing after install?

Best
James




On 23 January 2017 at 16:00, Mathew Sam <pmath...@gmail.com> wrote:
Just a heads up in that case. The instructions on the menpo website for installing menpo require setting up the environment. In this stage the environment downloads and installs python 3.6 in the environment. I don't know if this is messing with the implementation end. 

The older install with python3.5 still works beautifully, but when I tried installing menpo in a new system, though the installation goes without a hitch, there are issues when I try to run codes. If you don't mind could you change the install instructions so that it continues with python 3.5?

I am a beginner at this stuff so I apologize for nagging you like this!!
Regards,
Mathew
--
Mathew Sam,
Final Year Undergraduate Student,
Electronics and Communication Engineering,
National Institute of Technology Karnataka, Surathkal,


Reply all
Reply to author
Forward
0 new messages