ArcGIS Pro 2.2.0 and Python Package Manager

32778
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
DanPatterson_Retired
MVP Emeritus

Managing environments — Conda documentation 

conda info --envs # list your environments

conda remove --name myenv --all # get rid of the environment that you don't want.

It is a shame that esri remains mute on installing a basic python ide that you can use for projects.  There was a flurry of interest a while ago.

No problem mentioned during Beta 2.2 about me installing Spyder, Jupyter console and Jupyter Notebook.... heck!  I even got help on getting Anaconda Navigator installed so my students could access the documentation for all the good stuff in one location!

Really!? when is someone in the know going to step up and give me one good reason why the path that was taken was taken. 

Trying to 'save' myself from me?  Trying to cut down on tech support calls?  Look at the posts recently on this same topic.

Rant over, but I am getting sick of helping people do what I have blogged about .... and being thanked for it... and seeing others flounder around

Back to programming... Joe... contact me offline if you are still stuck

GhislainPrince
Esri Contributor

Joe,

 if you're having trouble at 2.2.1 .. do read over both these issue

 "Is not having an active env selected problematic." yes, you need an active environment for various functionality in pro (python window, many gp tools, pyt, options on certain tools - like calculateField, etc).

The fix is as you describe it: go to python backstage and activated arcgispro-py3 in the `Manage Environments` dialog.  You can also this at the command line : proswap arcgispro-py3 .  At that point you should not get a blank `Python Package Manager` page.

Once the active environment is fixed, you may see the `env's does not exist` once. But not afterwards.

Hope this helps.

0 Kudos
JoeBorgione
MVP Emeritus

The fix is as you describe it: go to python backstage and activated arcgispro-py3 in the `Manage Environments` dialog.  You can also this at the command line : proswap arcgispro-py3 .  At that point you should not get a blank `Python Package Manager` page.

What command line are you talking about?

Python window works:

But field Calculate Field is unavailable...

Edited moments later:

In a cmd window I cd into the C:\Program Files\ArcGIS\Pro\bin\Python\Scripts directory and run proswap arcgispro-py3 and I am returned this message:


The environment "arcgispro-py3" contains multiple NumPy installations based on its conda metadata. This typically is caused by upgrades or reinstallation, and should be resolved before trying to use the environment with ArcGIS Pro.

 

Another day, another problem to solve...

Edited again...

With  conda list -n arcgispro-py3  I see that there are two versions of numpy installed (v 1.13.3 & 1.14.2).  I also see two instals of several other packages:

notebook

pandas

etc

etc

Some have the the same version, some don't...  How jacked can I make this?!

That should just about do it....
0 Kudos
GhislainPrince
Esri Contributor

by command line i mean the "Python Command Prompt" application you can launch from the windows start menu.

The multiple NumPy installation sounds like a meaningful error.  If you've managed to get 2 of them installed into your arcgispro-py3 environment then that environment is in an unusable state.

It may be easiest at this point to call tech support and get them to help you to get this machine back to functional/known state.  The way will be through uninstall of pro, rename the leftover folder, and do new install (maybe some more things they're aware of).

0 Kudos
JoeBorgione
MVP Emeritus

In addition to this thread, I started a TS case:  I've escalated it as the original analyst was as baffled as myself. Waiting for a call back.  At this point I've uninstalled 2.2 and reinstalled it without 'upgrading' to 2.2.1.  I have opted not to install Spyder via conda just to keep things 'pristine' once TS gets back to me.  Using conda to list the packages installed by default, everything appears to be okay; no duplicates.  I tried cloning the default environment, to the local app data directory, and while it shows up using conda, ArcGIS pro does not 'see it'.  I've since removed that clone with conda...

That should just about do it....
0 Kudos
DanPatterson_Retired
MVP Emeritus

you have to install within the clone of the distribution.

Or use conda to install within the original distribution.

The latter option isn't being recommended, but producing clones may not be useable in your situation as in our environment.

0 Kudos
DanielAragon1
New Contributor II

Thanks Drew, However I'm deep in the ArcGIS file structure, found the jupyter folder and .exe files and yet can't launch any of them.  Tried calling them from the command line and nothing.  Can you provide a bit more direction here.  I'm very familiar with Jupyter Notebooks and Jupyter Lab already, but can't get the python3 version of arcpy to import.  Thank you

0 Kudos
DanPatterson_Retired
MVP Emeritus

Start, ArcGIS, python command prompt

If you prefer shortcuts, I show how to make them in one of my blog posts

(note, my install directory differs from most... from \bin onwards is the same

0 Kudos
DanielAragon1
New Contributor II

Thanks Dan, that worked and solved a second question I had about accessing notebooks elsewhere on our server.  Cheers

0 Kudos
DanPatterson_Retired
MVP Emeritus
0 Kudos