We are having trouble using Python v3.X in PyScripter. It always goes to verson 2.x. We are starting a project in Regular Expressions and it would be helpful to use Python 3.x. Does anyone know how to change the path to point to Python 3.x when using PyScirpter.
Thanks in Advance,
Ryan
The web solutions didn't work?
How to change the version of python that pyscripter uses - Stack Overflow
Yes - I tried all those options - and they don't seem to work. The ArcGIS Pro install of Python doesn't allow it.
Those instructions were for ArcGIS Pro 1.X. Things have changed over the years - the folders seem much different
Are you using a cloned environment or the base environment? That would make a big difference.
The python executable is located in
'C:\\ ... ... ... \\bin\\Python\\envs\\arcgispro-py3\\pythonw.exe' # ---- use >>> sys.executable
Where ... ... ... is the folder that ArcGIS Pro is installed in.
I always install it in a folder I create (eg. C:\arc_pro) rather than letting "it" install itself where it wants.
Thank you so much - but...still nothing. I use Windows 10 and
Python 3.6.8. It just seems like Python will not open in PyScripter at that level when it is still linked to an older version of Python 2.x. Should I re-install ArcGIS Pro and clone install Python to a different folder?
/blogs/dan_patterson/2018/12/28/clone
then perhaps
/blogs/dan_patterson/2018/12/13/spyder
But, I am surprised that pyscripter can use both pythons (spyder and other IDEs can direct to your chosen python)
Install the latest version of Pyscripter 3.6.2 https://sourceforge.net/projects/pyscripter/
Use the 64 bit version
On the <Run> menu item there is an option to set the interpreter. You can switch back between 2.7 and 3.6 at any time. Its Marvellous. I can continue developing scripts in ArcMap and ArcGISPro using the same IDE and the same scripts. It will support virtual environments set up with ArcGISPro.
I make all my 2.7 scripts 3.x compatible with a few simple changes to the syntax and adding __future__ to the top. Change all the print statements to print() functions (use the utility 2to3.exe in the scripts folder), a few other minor details and you are good to go!
Yes - I see that now. Thank you that worked.