Preferred Python IDE for use with ArcPro 3.0

1628
8
09-14-2022 04:11 PM
YvonneSorovacu
New Contributor II

I am new to using python with ArcPro and have had some problems using the Spyder IDE. I could not install the most recent version of Spyder AND the version I could install (5.1.5) has a bunch of glitches. Most importantly, the debugger function does not seem to work. I don't need or want anything with too many bells and whistles, and I'm still learning about how to install packages and work with environments. What suggestions do folks have for a Python IDE that reliably works with ArcPro and doesn't require any complicated maneuvering to ensure compatibility?

Tags (2)
0 Kudos
8 Replies
DanPatterson
MVP Esteemed Contributor

spyder 5.1.5 is the only version you can install at present because of arcpy/arcgis dependencies that prevent installation of the latest version.

However, a "pip" install works to get spyder going with the latest version since it really doesn't care about the arcpy/arcgis issues, you may not have a bug free experience with Pro or its notebook functionality, but that depends on what you do with Pro

Recommendations for an IDE will be preference dependent.  Good luck

 


... sort of retired...
0 Kudos
YvonneSorovacu
New Contributor II

Thanks, Dan. 

0 Kudos
YvonneSorovacu
New Contributor II

Ugh. I am so frustrated. I think I'm ready to just de-install Spyder with ArcPro and reinstall it with Anaconda. Is there a good guide somewhere about how to use Spyder with ArcPro once I get it loaded with anaconda? Everything I'm reading is loaded down with SOOOOO much jargon. 

How does this approach sound? https://www.linkedin.com/pulse/building-standalone-arcgis-scripting-environment-jordan-carmona-gisp?...

 

0 Kudos
zengle17
New Contributor

So I've similarly been messing with this this week. I got a fresh install of ArcPro 3.0.1 on my machine and cloned the default env through package manager, activated my clone, restarted Arc, then downloaded spyder 5.1.5 through package manager to my clone env successfully. I open spyder through my clone env / scripts and then spyder opens and I made sure it is also set to my clone env here. 

I go to the console and 'import arcpy' but get the attached messages despite seeing that Arcpy is in my clone env and that spyder is set to my clone env. Feeling at a loss with this. Would love to hear input on why arcpy will not work with spyder. 

0 Kudos
YvonneSorovacu
New Contributor II

All I did was install SPyder 5.1.5 to my clone with the ArcPro package manager. Then I followed the suggestions in the attached post to create a desktop shortcut as Dan suggests below. It imports arcpy and I can use all those tools fine. There are just issues with some other random things. Here's a link to the instructions I followed: https://community.esri.com/t5/arcgis-pro-blog/installing-spyder-ide-for-arcpro/ba-p/901923

0 Kudos
DanPatterson
MVP Esteemed Contributor

Try a shortcut on your desktop.  You need to execute the spyder-script.py script using python in your clone.  YHou still can't update beyond 5.1.5 because of things pinned and a convoluted dependency path which is being impeded somewhere along the trail.

# -- shortcut target
C:\arc_pro\bin\Python\envs\spyder-clone\pythonw.exe "C:\arc_pro\bin\Python\envs\spyder-clone\Scripts\spyder-script.py"
# -- C:\arc_pro\bin\Python\envs\spyder-clone\Scripts

# -- NOTE --
# replace \arc_pro\ with the path to your installation folder

 


... sort of retired...
0 Kudos
zengle17
New Contributor

Spyder 5.2.1 is working now on my windows machine that has Arcpro 3.0.1 installed. I did a slightly different workflow, not sure if will break things down the line but I've tested it out on several of my arcpy dependent py scripts without any issues so far. 

1) Ideally have all standalone spyder / anaconda / miniconda uninstalled and folders deleted off computer

2) Installed the latest version of miniconda

3) As administrator, started Anaconda Prompt (miniconda) and ran commands -

conda create --name chosen_env_name

activate chosen_env_name

conda install -c esri arcpy

conda install spyder

4) This automatically makes a ‘Spyder (chosen_env_name)’ shortcut which as Dan states, executes the spyder-script.py and should open spyder in the right env. The shortcut can be found under ..\Start Menu\Programs\

5) Perhaps double check by going to Spyder preferences – ‘Python Interpreter’ and that default (i.e. the same as Spyder’s) is checked. Restart kernel / restart spyder if necessary. 

capture.PNG

by Anonymous User
Not applicable

Should the chosen_env_name align with the python environment name being used in ArcPro 3+?

0 Kudos