2

I just installed ArcGIS Pro and would like to either import arcpy into anaconda, or use spyder as my IDE in GIS. I have tried two things:

  1. For ArcGIS Desktop you had to copy the .pth file from GIS to Lib/site-packages in anaconda. I did that but it didn't work.
  2. I went to this website, https://geonet.esri.com/blogs/dan_patterson/2016/07/17/anaconda-spyder-and-arcgis-pro, and I tried to find spyder.exe in my Scripts folder like the link says. It didn't exist. So I copied spyder.exe from Anaconda into that location. Then, when I launched my ide with ide from the command prompt within ArcGIS pro, it launched the default ide and not spyder.
4
  • 1
    Have you seen this one? my.usgs.gov/confluence/display/EGIS/… Commented Jul 26, 2017 at 16:06
  • I have successfully installed the spyder package into Pro using the Python Package Manger (i.e. it shows up in my list of Installed Packages). I have tried to use conda install spyder but was getting the following error: File "<string>", line 1 conda install spyder ^ SyntaxError: invalid syntax I then tried to install all three conda packages ("conda-build-all", "conda-package-handling", and "conda-verify") as well as the "anaconda" package, but only two of them actually appear to have installed. ![enter image description here](i.sstatic.net/m
    – Cherie
    Commented Feb 27, 2019 at 16:01
  • Welcome to Stack Exchange! This is really its own question, so you probably should just post it as a separate question. But it looks like you are trying to run the conda install spyder command from within the Python interpreter. It should be run from a command prompt instead, not from within Python. Also make sure you have the correct environment activated. But easiest would be to install from the Pro package manager GUI (your last screenshot). Commented Feb 27, 2019 at 16:12
  • Based on what you are doing I will just add, make sure you do this from the anaconda command prompt which is in the same folder as arcgis pro, and not the normal windows command prompt Commented Feb 27, 2019 at 16:45

2 Answers 2

13

I've found it easier to just install spyder into each python environment rather than trying to get a single spyder install to work with multiple environments.

To install spyder in ArcGIS Pro, open the Python Package Manager and install spyder from there or open your ArcGIS Pro terminal/activate your ArcGIS Pro environment and run conda install spyder

2
4

This question seems resolved but I found an easy way to use arcpy on Spyder.

First, in ArcGIS pro you need to create a new environment of python from Python Package Manager. (I created in default folder and creating a clone didn't work for me, so better to make a new one)

After you set up the environment open Anaconda and change the environment from "Applications on --" dialog. switch environment

Then it switches to that environment, and open Spyder.

Now you can use arcpy on Spyder.

However, keep in mind that you have to manage the modules in GIS Pro.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.