Select to view content in your preferred language

Can't Launch Spyder After Installing Via Conda

3409
6
10-12-2021 01:00 PM
vviera
by
Emerging Contributor

I ran into problems acquiring Spyder using the ArcGIS Pro Python Package Installer. I went through the normal process of creating the cloned environment in the program but none of the install processes would ever complete. 

I read up more online and resorted to both cloning the Python environment and installing the modules/packages I wanted through conda via the Python Command Prompt. I can verify that the packages have installed in the cloned environment by checking back afterward in Pro and seeing them in the installed packages list. 

However, I can't get Spyder to launch successfully from the .exe file in the Scripts folder in the cloned directory. I get this message coming up in the Command Prompt that closes very quickly unless I click and drag inside the window. The package the error message claims is an issue is definitely also installed though. See attached screenshots. 

Any idea of why this would happen? I'm not sure what I'm missing. If it matters, the cloned environment is activated both in Pro itself and the Python Command Prompt.

Sorry if I committed some faux pas with my post here, I am a first time poster. Thanks!

 spyder.PNGmkl_service.PNG

0 Kudos
6 Replies
DonMorrison1
Frequent Contributor

I went through this just a couple of days ago and had no problem.  I did everything from within ArcGIS Pro

  1. Create the clone
  2. Make the clone active
  3. Restart ArcGIS Pro
  4. Add the python package to the cloned install (it does take a while to complete)

Once I got it up and verified it worked, I upgraded it using PIP from the DOS command line:  pip install --upgrade spyder

I have had problems in the past like you describe so it was a big relief when it came up OK. One thing to check is to make sure there are no other spyder processes running when you attempt to start it. It appears that if there is already a spyder process running the startup aborts.

 

0 Kudos
vviera
by
Emerging Contributor

I went through that process exactly as you described for the first four steps and the packages would not install. I would get the blue slider loading bar but eventually it will just stop and the package will not have installed. 

I'll try checking to make sure there are no other Spyder processes running, that could possibly be it. 

0 Kudos
JoeBorgione
MVP Emeritus

What version of ArcGIS Pro are you using?  2.8 has a history of being problematic with  clones where you think your clone is active, in reality it is not.

That should just about do it....
0 Kudos
vviera
by
Emerging Contributor

I'm actually still on version 2.7.0

0 Kudos
JoeBorgione
MVP Emeritus

Darn.

Clones can be a pain but to expand on what @DonMorrison1 suggests, here is my method.

First of all, I suggest you upgrade to at least 2.7.4.  As I mentioned I've experienced problems at 2.8 as well as 2.8+ so I'm using 2.7.4 myself

Cloning: Open ArcGIS Pro; down at the lower left corner you'll see the Settings 'gear' icon. (Don't bother opening a project per se, just Pro). Click on Settings and on the left panel, click Python.  At this point you'll see your active environment.  Notice below that I create a a specific target folder as well as naming convention for my clones:

JoeBorgione_0-1634221120959.png

I like to put my clones where I can find them rather than burying them where ArcGIS Pro does.

Assuming you have a target directory, let's set about cloning your Default Environment.  Click on Manage Environments, and when presented with the Manage Environments pane, activate the the Default Environment with a single click. On the right side of the pane, is the Clone column; single click on the icon next to your default environment and you are presented with another pane that allows you to name your clone as well as put where you want it:

JoeBorgione_1-1634221559985.png

 

Click OK and let it do it's thing... Single click on the new clone and click OK to activate. Close ArcGIS Pro:

JoeBorgione_2-1634222777762.png

This is where my method is going to slightly change from @DonMorrison1 ...

Installing Spyder: Using your Windows Start button, navigate to the ArcGIS folder and select Python Command Prompt.  It will be the new clone:

JoeBorgione_3-1634222975989.png

Personally I don't care for the ArcGIS Pro Package manager and prefer to use a Conda install for any custom installation of packages.  Click here for a Conda Command Cheat Sheet.

I use this command for Spyder:

JoeBorgione_4-1634223402138.png

Again, let it do the mojo....  You'll get a Proceed ([y]/[n]) prompt: answer y.  More bumping and grinding; be patient it may toss some warnings and other messages.  Just let it go.

JoeBorgione_5-1634224020982.png

Once you return to the command line, type in spyder and see what what happens.  I actually ended up with Spyder 5.0.4 because the 'channels' I go through didn't provide 5.0.5, but that's no big deal.  You can always just update when you Spyder fires up.

 

 

 

 

That should just about do it....
0 Kudos
DanPatterson
MVP Esteemed Contributor

conda install spyder=5.1.5 --no-pin

worked for me, installed in base environment

spyder_5.png


... sort of retired...