ArcGIS Pro 2.2.0 and Python Package Manager

34624
112
Jump to solution
06-27-2018 11:00 AM
MitchHolley1
MVP Regular Contributor

I updated to Pro 2.2.0 today and noticed the default python environment is now read-only.  The previously downloaded packages I had were wiped out with the new update.  I need to get the package, spyder, back into my environment.  So, I cloned the arcgispro-py3 environment in order to make the install. 

Notice that the window says, "Restart ArcGIS Pro for your environment changes to take effect."

So, I clicked 'Exit'. 

After the program restarted, I no longer have a cloned environment to select.

Can someone please help?

112 Replies
ErikLash1
Regular Contributor

I have a need to run administration remotely and can not be calling python from individual local users app directories. That would be a scripting nightmare, especially when running the same scripts on different machines. For our network we require scripting environments that are identical on multiple machines as we have no desire to write separate scripts for each user on the network in order to undertake machine level processes.

It's fine if each user has the ability to create and use their own environments but the root scripting environment for the main software deployment needs to be accessible for us to add packages to when necessary as ArcGIS default install does not come with packages critical to our workflow like Spyder installed.

Maybe ESRI can consider a snapshot approach to environment management (refresh to install state) at the root for disaster recovery instead of forcing environments for each user when our needs are much simpler than that in the enterprise. Or maybe ESRI can set it read only be default but provide a switch that would allow us to change it if we desire.

Followed the above command line workflow to create and activate an environment in a local folder c:\python3\envs\myEnvName. With the command prompt still open, started Python 2.2.2. Went to Python Package Manager environment manager and my new environment was listed. Clicked the button to enable it as my project environment. Success! Even noticed a new Jupyter Notebook shortcut showed up for the new environment.

Then closed Pro and the command prompt and reopened them. My environment was no longer listed in the environment manager. It disappeared. Can't get it to come back. Tried recreating the environment but no joy.

As far as the "Update Package" issues, they still exist for me after creating a clone in my local user directory. 39 packages that can't be updated through the gui.  Updating them at the command line works.

0 Kudos
ErikLash1
Regular Contributor

Got Spyder installed through package manager but there are Kernel errors just like before. It's the expected result.

Something in the security policy locks the users appdata directory from executing certain commands and files (.css for instance). Spyder will not function from within it. Nor will ArcGIS Pros environment.

Spyder is working fine for us when run from an ArcGIS Pro clone environment placed on the root c:\python3\envs\myEnvName

This is a flaw in the software design, not in the actual software itself. 

Pro is useless to our municipality until ESRI fixes this and provides an environment install location that is not in the users AppData directory.

ErikLash1
Regular Contributor

After several install/deinstall/reinstall scenarios I was able to get Spyder to function from the appdata directory. It seems that there is something very much not quite right with the ArcGIS Pro package manager:

  • When running a clone from the gui it downloads all of the packages from the internet - what???? 
    • My cloned environments became unusable because of incomplete and corrupted downloads when cloning from the gui.
    • One scenario my cloned environment completed with just 4.7 mb of files in it.
  • Conversely when running a clone from the command line it creates an actual clone of the ArcGIS pro environment and not a new download.
  • When installing spyder from the command line I could not get a good install in my appdata folder for reasons unknown.
  • Conversely when installing spyder from the gui into the appdata folder, it installed correctly and now works. I'm completely unsure what the difference is. Command line install of spyder worked fine in my test environment at c:\python3

Next - attempting a Anaconda Navigator install. 

Update - Pros conda environment is still broken in regards to Anaconda Navigator in my install. Same exact errors as before upon initialization. 

May I suggest that the ESRI team start with a base working install of Conda then add ArcGIS functionality into it instead of working backwards from ArcGIS to Conda. Pros Conda does not seem to maintain compatibility with the community standard.

If we could please have a working Conda environment we'd be a lot more apt to use Pro. As it is now, I can't recommend this software to any of the users in my Enterprise and I certainly can't support it if they do decide they want to use it.  Thanks.

Update 2 - After a computer reboot Spyder no longer works from "AppData". Still works fine from c:\python\envs\myEnvName test location. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

As said earlier... the solution to the clone wars is....

just saying …. Install Spyder, Jupyter console and Jupyter notebook for ArcGIS Pro by default 

ErikLash1
Regular Contributor

Logged a support request specifically for things breaking in appdata. Back to 2.1

0 Kudos
DanPatterson_Retired
MVP Emeritus

The 2.2.2 patch information only covers bug fixes.

Where is the information on

  1. enhancements?
  2. changes to the python modules
    1. were new ones installed?
    2. which packages were updated
  3. are previous updates to the main installed wiped out?
  4. you have to update the main install, then reclone it (see 3 above)
  5. ….. please add here
TimMinter
Frequent Contributor

Nice.  My solution space is so constrained with Esri-tech by three walls:  bugs, licensing, and strategy.  I just bloodied my face on the bug wall again.  ArcGIS Pro 2.2.2, hours burned, no Spyder.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Tim...

conda install or  the clone

But you are probably in an environment where you can't without permissions,

For those not familiar with Spyder 

/blogs/dan_patterson/2018/01/28/spyder  ….. 

/blogs/dan_patterson/2018/07/01/arcgis-pro-your-conda-environments  …. plus other options

So get onboard Tim

Install Spyder, Jupyter console and Jupyter notebook for ArcGIS Pro by default 

TimMinter
Frequent Contributor

Howdy Dan - I appreciate you sharing your alternate approaches and workarounds.  At some point, I'm probably going to need to use them.

I'm attempting to stay onboard the Esri train, but I keep falling out windows, through the floors, etc..  I learned a long time ago to keep my arms and legs inside the ride at all times, if possible, so the support team doesn't have a clean "unsupported workflow or configuration" case closure response.

My actions:

  • submitted a support request, primarily as a "me too" indicator
  • searched "Edit with IDLE (ArcGIS Pro)" in my registry, found the key, copied the value (the entire string), went to ArcGIS Pro > Project > Options > Geoprocessing > Script Editor - pasted that thar string in that thar field > OK.
  • Now in ArcGIS Pro, I can right-click a script tool > Edit > and up it pops in an IDE instead of Notepad.
  • put any sort of Spyder goodness on hold until...  sometime later.

Now I just have to figure out what it was I was doing for work and get restarted on that.  Because that's what I'm getting paid to do instead of cobbling together tools.

tim

0 Kudos
JoeBorgione
MVP Emeritus

Can this be of help?  https://community.esri.com/thread/220006-another-arcgis-pro-condapythonspyder-post 

That should just about do it....