Installing spyder IDE for ArcPro

11468
19
11-13-2019 04:34 AM
DuncanHornby
MVP Frequent Contributor
6 19 11.5K

Introduction

This is a mini guide to installing the spyder IDE so it works for ArcPro and is arcpy aware. Just upgraded ArcPro to the latest version?  See end of article for top tip. 

 

Background info

ArcPro is 64 bit and the version of Python it uses is 64 bit so you need an IDE that will work with a 64 bit version. As of version 2.4.2 of ArcPro it is using Python 3.6.8 in the Anaconda environment.

 

Important pre-install instructions

If you have gone to the Spyder website, downloaded it directly and installed it then that was the wrong thing to do! Uninstall it.

 

Install instructions

  1. In ArcPro click on Project tab then Python in the blue menu bar.
  2. Click on Manage Environments button and in the dialog box you will see the default arcgispro-py3 environment, this is the base install environment.
  3. To avoid corrupting this base environment, click on the clone icon and create a clone, you can choose the default name (arcgispro-py3-clone) or set it to something else. This will take several minutes to run as the environment is cloned.
  4. Make sure it is the Active environment, click OK and restart ArcPro.
  5. In ArcPro click on Project tab then Python in the blue menu bar. Make sure your cloned environment is the active environment.
  6. Click on the Add Packages button.
  7. Find Spyder and then click on the Install button in the panel to the right. Again this will take several minutes for it to install.
  8. That's it you just installed a version of the spyder IDE that will work with ArcPro and is aware of the arcpy module.

 

Post Install instructions

Having installed spyder how do you actually run it? Well the way I do that is to create a short cut to it and place that on my desktop.  You will find the application here:

 

C:\Users\xxx\AppData\Local\ESRI\conda\envs\yyy\Scripts\spyder.exe

 

xxx = Your user login

yyy = Your chosen name for the cloned environment

 

  1. Open file explorer and navigate to spyder location.
  2. Right click on the application and send to desktop to create a shortcut.
  3. Optionally right click on the newly created shortcut, select properties and set the icon for the application, the ico file is in the same folder location as the application.

 

My desktop icons:

 

Tips for when upgrading ArcPro breaks your python environment...

 

I want to share with you a few ideas for you to investigate....

I recently upgraded from 2.8 to 2.9 and this broke my python environment, I eventually tracked it down to the fact I had previously installed (following ESRI's recommended steps) the deep learning libraries and this was causing spyder to fail to install in the new cloned environment because of incompatibility issues with some of the python modules. I did the following:

  1. Uninstall deep learning libraries via add/remove programs
  2. Uninstalled ArcPro
  3. Deleted the contents of the folder C:\Users\XXX\AppData\Local\ESRI\conda where XXX is your user profile name
  4. Installed ArcPro

This then allowed me to successfully clone the python environment and then install spyder.

Tags (3)
19 Comments
About the Author
GIS Desktop Developer I have specialised in river network analysis and mapping but have worked on a wide variety of projects. I am often found at the bottom of a cave!