Python 2 or Python 3 - What say you

OK, here’s my situation. I’ll be writing UE Python tools from a clean slate – no UE Python tools exist. I know, or it appears that Epic will be moving UE to Python 3 at some point (it sounded like this year from what they were saying last year, but v4.25 is still using Python 2.7). I have the option of starting these tools in Python 2.7, or building Unreal from source to support Python 3.7 and going from there. Part of me wants to stick with Python 2.7 because that is the “supported” version by Epic, however, the thought of them moving UE to Python 3.x later, and my having to update a year’s worth of Python 2.7 tools to Python 3.x doesn’t sound like a fantastically fun process (even if I think my code is already Python 3 compatible). Plus I wonder what the risk of regression is in doing so.

So I’m wondering if there is a consensus on the reliability of Python 3 code in Unreal? Is it any different than Python 2.7? And if anyone else has approached this same problem, how did you approach it? Other thoughts welcome.
Cheers

Hello there, also interested by the same information

Sooner or later Epic will need to switch to 3 as Python 2 Packages are not getting any official support no more, which means further bug’s won’t be fixed, which is bad in software cycles.

@schiho is right - UE4 (and Maya and others) are supposed to adhere to the VFX Reference Platform https://vfxplatform.com/ which says Python 3.x is required this year. In large part because Python 2 is no longer in development.

Very poor decision on their part (the VFX working group, not Epic specifically) to wait this long.

UE4 yet running 2.7
the switch for 3.x will happen soon.
There is no consequences will hit you down the road, your only issue if your tools is not utilizing the API of epic only.

If you want some resources, there you go my free scripts repository, which been yet used to learn editor python scripting in multiple studios, including the big ones:

if you want to go the extra mile, then you can check the udemy course, it is covering the entire topic.

-m

Hi,

I’m excited to uncover this page. I need to thank you for your time for this, particularly fantastic read!! I definitely really liked every part of it and I also have you saved to fav to look at new information in your site.

Hi,

I think features of Python 3 is advanced than Python 2.

UE4.26 and 4.27 are using python 3.7.7 and 5.0 will be using python 3.9.7