Cannot create new python environment in ArcGIS Pro 2.2

15298
24
07-03-2018 12:13 AM
ChrisHills
Occasional Contributor

I have updated ArcGIS Pro to 2.2, and now I am unable to create a new python environment. I have tried both cloning the default, and creating a new one. It creates a new directory in the %USERPROFILE%\AppData\Local\ESRI\conda\envs folder, but after I click on Ok, it disappears, and even after restarting ArcGIS Pro only the default python environment is available.

24 Replies
DanPatterson_Retired
MVP Emeritus

There are "issues" around creating a new environment

https://community.esri.com/thread/217048-arcgis-pro-220-and-python-package-manager

but there are things that can be done to get things done until the issue is resolved

arcgis-pro-your-conda-environments

DuncanHornby
MVP Notable Contributor

I too have updated to 2.2.0 and noticed that I am unable to clone or create a python environment in ArcPro. I'm using Windows 8.1. My colleague has exactly the same problem and he is using Windows 10.

Interestingly I had installed spyder in the previous version of ArcPro and this is working fine for me after updating to 2.2.0. My colleague is unable to install spyder as he cannot clone an environment or install into the read only environment.

Seems like the system is broken and needs fixing?

0 Kudos
DanPatterson_Retired
MVP Emeritus

if your colleague knows how to use conda, you can install Spyder from conda with 2.2.... you just can't do anything with the package manager at present.

I think it is like putting matches in an upper cupboard to protect the young and foolish... it only works for those that don't have access to a step stool or an older/taller sibling

0 Kudos
DanPatterson_Retired
MVP Emeritus
0 Kudos
GhislainPrince
Esri Contributor

Chris try this pls.

Open ArcGISPro 2.2, confirm that the python window is functional (doesn't display red text "Failed to initialize interpreter").

If python window is functional

  1. go to python in back stage
  2. open the "Manage Environments" button, click "New"
  3. WAIT until the blue progress spinner at the bottom of the dialog completes. This may take a while (think 10 minutes).  Don't click anything else during this time.
  4. click Activate and restart ArcGISPro

if that fails pls paste last few lines in %LocalAppData%\ESRI\conda\conda_log.txt here . thanks

AbhijeetKulkarni
Occasional Contributor

I am trying your steps ( for ultimately adding package 'untools' in 2.2) and below are last four lines in said log.'pyenv' is name I used for new environment.

Swap: Directory environment detected
Swap: Received request for proswap to local environment C:\Users\myuser\AppData\Local\ESRI\conda\envs\pyenv
Swap: After path resolution, environment is C:\Users\myuser\AppData\Local\ESRI\conda\envs\pyenv, named pyenv, is local? True
Swap: The environment C:\Users\myuser\AppData\Local\ESRI\conda\envs\pyenv doesn't contain NumPy, which is required for ArcGIS Pro.

Thank You.

0 Kudos
GhislainPrince
Esri Contributor

Hi Abhijeet, can you look in conda_log.txt for the call that creates pyenv. It'll be this 

DEBUG:__main__:conda.cli.main called with ('C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe', 'create', '--clone', 'arcgispro-py3', '-p', 'C:\\Users\\YourUserName\\AppData\\Local\\ESRI\\conda\\envs\\pyenv', '--no-shortcuts', '--pinned', '--json')

can you paste here the next 5-10 lines of messages.

thanks

0 Kudos
AbhijeetKulkarni
Occasional Contributor

Hi Ghislain,

Below is whole of it.

INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
DEBUG:__main__:conda.cli.main called with ('C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe', 'create', '--clone', 'arcgispro-py3', '-p', 'C:\\Users\\myuser\\AppData\\Local\\ESRI\\conda\\envs\\myenv', '--no-shortcuts', '--pinned', '--json')
DEBUG:__main__:Ignoring first argument (C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe), as it is not a subcommand
INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
DEBUG:__main__:conda.cli.main called with ('C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe', 'proswap', '-p', 'C:\\Users\\myuser\\AppData\\Local\\ESRI\\conda\\envs\\myenv', '--json')
DEBUG:__main__:Ignoring first argument (C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe), as it is not a subcommand
INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
INFO:conda.proconfig:proreg call
INFO:conda.proconfig:hive call
INFO:conda.proconfig:Detected ArcGISPro as product
DEBUG:__main__:conda.cli.main called with ('C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe', 'proswap', '-p', 'C:\\Users\\myuser\\AppData\\Local\\ESRI\\conda\\envs\\myenv', '--json')
DEBUG:__main__:Ignoring first argument (C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe), as it is not a subcommand
Swap: Directory environment detected
Swap: Received request for proswap to local environment C:\Users\myuser\AppData\Local\ESRI\conda\envs\myenv
Swap: After path resolution, environment is C:\Users\myuser\AppData\Local\ESRI\conda\envs\myenv, named myenv, is local? True
Swap: The environment C:\Users\myuser\AppData\Local\ESRI\conda\envs\myenv doesn't contain NumPy, which is required for ArcGIS Pro.

0 Kudos
PhilLarkin1
Occasional Contributor III