Code completion not working in Spyder 5.1.5 after upgrade to ArcPro 3.0

305
2
Jump to solution
06-24-2022 07:08 AM
DuncanHornby
MVP Frequent Contributor

All,

Hoping to get advice on resolving issue with new spyder IDE in new ArcPro 3.0...

So I have upgraded to ArcPro 3.0, looks great and loads of new functionality. I cloned the default environment using the new ArcPro Package Manager and in my new cloned environment I installed the 5.1.5 spyder IDE.

The IDE runs and insisted I installed something called Kite, which I allowed. My first line in the Editor (not console) was import arcpy, My second line was arcpy.Add... but no autocomplete appeared. It seems to be broken and I'm hoping someone from ESRI could advise?

I checked preferences, all looks OK.

DuncanHornby_0-1656079386719.png

Importantly this never stops spinning...

DuncanHornby_1-1656079444353.png

A quick search on the internet and some sites suggest right clicking on it and choosing restart, I did this the word changes from starting to restarting and the icon keeps spinning forever and no change in auto-completion.

In the console, auto-completion works.

So basically I use Spyder because its the supported IDE that ArcPro distributes through package manager but I can't now write any code as the auto-completion does not work... 😞

I can also replicate this problem on a second independent machine.

0 Kudos
2 Solutions

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

Don't bother trying to fix it.  I haven't been able to track down the dependency that is at issue. It is related to the python-language-server

I think it is one of those >= dependencies  which should have been a >-= and <

I filed an issue on their github site and they couldn't narrow it down.

Install 5.3.x was the suggestion, however Anaconda is brutally slow in updating packages and Spyder is one of them/.

Don't use conda-forge either, it is worse.

Besides, you type fast and don't make mistakes? don't you?  😉


... sort of retired...

View solution in original post

0 Kudos
DuncanHornby
MVP Frequent Contributor

OK for anyone facing the same problem, Dan's suggestion of upgrading Spyder seems to have worked, nice one Dan! A virtual beer is coming through your letterbox.

ArcPro 3.0 does not allow you to upgrade spyder to 5.3.1, it's simply not an option, so this is what I did:

  • Opened a command line window in admin mode
  • Changed directory to my cloned environment for me it was:

 

cd C:\Users\hornbydd\AppData\Local\ESRI\conda\envs\arcgispro-py3_spyder\Scripts

 

  • Upgraded Spyder with the following command:

 

pip install -U spyder

 

I let it update and opened Spyder and the autocomplete is now working as expected. I should say that to do all this ArcPro must be closed.

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Don't bother trying to fix it.  I haven't been able to track down the dependency that is at issue. It is related to the python-language-server

I think it is one of those >= dependencies  which should have been a >-= and <

I filed an issue on their github site and they couldn't narrow it down.

Install 5.3.x was the suggestion, however Anaconda is brutally slow in updating packages and Spyder is one of them/.

Don't use conda-forge either, it is worse.

Besides, you type fast and don't make mistakes? don't you?  😉


... sort of retired...
0 Kudos
DuncanHornby
MVP Frequent Contributor

OK for anyone facing the same problem, Dan's suggestion of upgrading Spyder seems to have worked, nice one Dan! A virtual beer is coming through your letterbox.

ArcPro 3.0 does not allow you to upgrade spyder to 5.3.1, it's simply not an option, so this is what I did:

  • Opened a command line window in admin mode
  • Changed directory to my cloned environment for me it was:

 

cd C:\Users\hornbydd\AppData\Local\ESRI\conda\envs\arcgispro-py3_spyder\Scripts

 

  • Upgraded Spyder with the following command:

 

pip install -U spyder

 

I let it update and opened Spyder and the autocomplete is now working as expected. I should say that to do all this ArcPro must be closed.

0 Kudos