Upgrading the arcgis package

1032
8
12-05-2018 09:56 AM
JillianStanford
Occasional Contributor III

Hi All,

I am trying to upgrade the arcgis python package but am stuck on how to use the new environment with Jupyter Notebooks.

I am following the instructions here - Install and set up | ArcGIS for Developers

I am able to create the new environment and get the upgraded package with no problem.

The next step in the doc is "Open the Python Command Prompt: Start > All Programs > > ArcGIS > ArcGIS Pro > Python Command Prompt" but this opens the command prompt in the old environment (arcgispro-py3).

Did I miss a step? I see that the Python Command Prompt reads the environment location from a config file (which is still pointing to the old environment), am I supposed to edit this?

Sometimes the space in my user profile causes problems but the package manager won't let me choose where to install the new environment.

Any ideas?

Thanks!

Jill

0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

You have to switch into the cloned environment... which you can do in Pro or through conda

JohnYaist1
Esri Contributor

Hi Jill

In the command prompt with `arcgispro-py3` active...try typing this:

activate arcgis-pro-new

 That should make the upgraded environment active, and from there you can type

jupyter notebook
JillianStanford
Occasional Contributor III

Hi John,

Thanks for taking the time to reply.

That works! Thank you.

Is there a way to make this environment the default? Each time I start the Python Command Prompt I have to activate the new environment?

Jill

0 Kudos
JohnYaist1
Esri Contributor

I see that whichever environment I set as the active environment in the Python Package Manager in Pro is the environment that the Python Command Prompt opens with as active. Try going into Pro and click the Manage Environments button and then click the radio button next to the arcgis-pro-new environment - you should get a message in the dialog stating you need to Restart Pro for the change to take effect. So Close the Python Package Manager and then close Pro. Then try starting the Python Command Prompt - does it start with arcgis-pro-new as active?

0 Kudos
JillianStanford
Occasional Contributor III

Hi John,

Yes, I've tried switching back and forth using the manage environments dialog and the command window always opens in arcgispro-py3.

Thanks!

Jill

0 Kudos
JillianStanford
Occasional Contributor III

I tried opening Pro as an Administrator and creating a brand new environment but that didn't seem to make a different.

The Python Command Prompt bookmark runs a batch file that seems to read the default environment from a config file (proenv.txt). I would expect this config file to get updated with the path to the the current environment but that doesn't seem to be happening.

Thanks!

0 Kudos
JohnYaist1
Esri Contributor

Yes - The Python Command Prompt uses the proenv.bat to activate the environment listed in the proenv.txt file. With my Pro 2.2.4 installation, I have a proenv.txt file in my user profile directory - C:\Users\username\AppData\Esri\conda\envs that seems to take precedence over the proenv.txt file in the Pro installation directory. It sounds like your system is reading the file in the Pro installation directory. What release of Pro are you using? Do you have a proenv.txt file in your user profile?

0 Kudos
JillianStanford
Occasional Contributor III

Hi John,

Pro 2.2.4 and yes, I have the proenv.txt in my user profile and it points to the new environment.

Thanks!

0 Kudos