Switch Jupyter Notebooks to cloned python environment

2013
3
Jump to solution
09-25-2019 08:39 PM
AmosBennett1
New Contributor

I've cloned my environment in ArcGIS Pro setting and installed a bunch of stuff. When I open up Jupyter Notebooks, it still reverts back to the root environment.

Anyone know how to switch it for use in notebooks? 

0 Kudos
1 Solution

Accepted Solutions
KimberlyMcCarty
Esri Contributor

The easiest way to start Jupyter Notebook with your desired environment and from your desired startup location is to:

  1. Open the Python Command Prompt from the Start menu, the active environment in ArcGIS Pro will be the active environment.
  2. If you want to change to a different python environment enter: activate <env-name>
  3. If you want to change to a different starting directory enter: cd <dir>
  4. Launch Jupyter Notebook by entering: jupyter notebook

You can list the python environments available to switch to with: conda env list

See the screenshot below:

View solution in original post

3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Some references on the web... the desktop shortcut route works

3. Running the Jupyter Notebook — Jupyter/IPython Notebook Quick Start Guide 0.1 documentation 

but watch the time that the suggestions were made... the 'correct' approach is a moving solution

path - How to change the Jupyter start-up folder - Stack Overflow 

If you have clones, make sure you have the proper environment activated.

Jupyter Lab is an option as well

JupyterLab Documentation — JupyterLab 2.0.0a0 documentation 

shortcuts creation for Pro... not specific to notebook

/blogs/dan_patterson/2017/07/01/arcgis-pro-2-creating-desktop-shortcuts 

0 Kudos
KimberlyMcCarty
Esri Contributor

The easiest way to start Jupyter Notebook with your desired environment and from your desired startup location is to:

  1. Open the Python Command Prompt from the Start menu, the active environment in ArcGIS Pro will be the active environment.
  2. If you want to change to a different python environment enter: activate <env-name>
  3. If you want to change to a different starting directory enter: cd <dir>
  4. Launch Jupyter Notebook by entering: jupyter notebook

You can list the python environments available to switch to with: conda env list

See the screenshot below:

AmosBennett1
New Contributor

Thanks Kimberley, this worked for me. I also had to install ipykernal in the new environment but now it's working.