Select to view content in your preferred language

Migration of old ArcMap python 2.7 for use in ArcGIS Pro 3.4+

139
2
Jump to solution
a week ago
TimWestern
MVP

I have been reviewing recommendations on how best to manage legacy ArcMap python 2.7 scripts, for the purpose of upgrading them for use in ArcGIS Pro/Enterprise 3.4 and 3.5.

While doing so I found this helpful document about the Analyze Tools For Pro (Data Management)

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/analyzetoolsforpro.htm 

It states that the Analyze Tools for Pro uses the Python 2to3 utility to review Python Code.

Sounds great right?

Well it would, except that 2to3 is deprecated  since version 3.11.  (Does pro stick to 3.11 current version in development is 3.15?)

TimWestern_0-1747147486295.png


I checked in my local Python 312 install and noticed this tool is not found anywhere.

So my question is, is this tool still available and works in ArcGIS Pro if python removed the lib2to3 module?

Will the advice be changing if its not able to be used moving forward?







 

 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

according to the docs that lib2to3 .....

Deprecated since version 3.11, will be removed in version 3.13:

check your installation path for a lib2to3 folder  (eg C:\...pro install folder\Lib\lib2to3)

it is a command line tool so you can use the python command prompt or powershell

r2to3.png

Pro 3.5 will ship with python 3.11.11

The above image is my 3.13 environment and the utility is still around

 


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

according to the docs that lib2to3 .....

Deprecated since version 3.11, will be removed in version 3.13:

check your installation path for a lib2to3 folder  (eg C:\...pro install folder\Lib\lib2to3)

it is a command line tool so you can use the python command prompt or powershell

r2to3.png

Pro 3.5 will ship with python 3.11.11

The above image is my 3.13 environment and the utility is still around

 


... sort of retired...
0 Kudos
TimWestern
MVP

Ah, the Conda environments have it?  

Turns out I was looking in the C Drive.  So ArcGIS must bundle with it included then?  (I tested the tool btw and did get some feedback, so I admit I found that a bit confusing)  So if ESRI keeps including it it should be fine. Thank you.

0 Kudos