Can't Clone Python Environment with ArcGIS Pro 2.4.2

12373
9
Jump to solution
10-24-2019 01:47 PM
MitchHolley1
MVP Regular Contributor

I cannot clone my Python environment with ArcGIS Pro 2.4.2.  I get an error with no error message as to why it failed.  How can I install packages without cloning my environment?

Tags (1)
1 Solution

Accepted Solutions
MitchHolley1
MVP Regular Contributor

I found a solution to this problem based on James Whitacre answer from this thread.

  1. Copy and paste the default, read-only 'arcgispro-py3' env in 'C:\Program Files\ArcGIS\Pro\bin\Python\envs' to 'C:\Users\[username]\AppData\Local\ESRI\conda\envs'  I created a new directory on my C: drive and pasted the copied directory there. (C:\ArcGIS_Pro\Conda\Cloned_Envs)
  2. Rename the folder to be unique (e.g. 'arcgispro-py3-username')
  3. Open ArcGIS Pro, then Package Manager, and activate the env (Note that a new 'proenv.txt' file is added to the env folder. I am not sure what this does, but it lists the folder of the newly create env.)

View solution in original post

9 Replies
DanPatterson_Retired
MVP Emeritus

/blogs/dan_patterson/2018/12/28/clone 

Assuming that you have administrative rights on your computer, or can buy a coffee for the IT person

Next time you install, avoid c:\Program....

Download the exe to a folder (to keep), run it to get the cab and msi file, run the msi.

Choose the only user option if that is possible in your environment

If you need to clone....

Now did you click Clone Default  (top left)  or clone (right side).

I only cloned for testing but if memory serves, one works the other doesn't do what you think it does

MitchHolley1
MVP Regular Contributor

I found a solution to this problem based on James Whitacre answer from this thread.

  1. Copy and paste the default, read-only 'arcgispro-py3' env in 'C:\Program Files\ArcGIS\Pro\bin\Python\envs' to 'C:\Users\[username]\AppData\Local\ESRI\conda\envs'  I created a new directory on my C: drive and pasted the copied directory there. (C:\ArcGIS_Pro\Conda\Cloned_Envs)
  2. Rename the folder to be unique (e.g. 'arcgispro-py3-username')
  3. Open ArcGIS Pro, then Package Manager, and activate the env (Note that a new 'proenv.txt' file is added to the env folder. I am not sure what this does, but it lists the folder of the newly create env.)
PaulHoefflerGISS
Occasional Contributor III

After a protracted case with Esri Technical Support we found that:

1) Manually cloning a Python environment for ArcGIS Pro (2.5.2) using the copy and paste method outlined above results in an environment that displays in Pro, but can't have any packages installed or updated.

2) Editing the .condarc file located at :\Program Files\ArcGIS\Pro\bin\Python to include a non-indented line specifying: ssl_verify: False did allow us to clone a fully-functional Python environment in the Pro Manage Environments window. We have a SSL intercept in our environment, so that was the cause of the issue in our case.

Worth noting is that the offline mode is broken in Conda, so if you try to specify offline mode and are having SSL or other connectivity issues the cloning may still fail because it's still trying to reach a remote server to clone some packages.

If you hover of the error icon it will sometimes display one or more error messages, which in some cases contain useful information.

Dan Patterson‌ will have a better understanding of how all of this does and should work, but that's what I can share based on recent experience of my self and others.

Somewhat related, I've found that the Update Packages doesn't appear to reflect accurate information or work at 2.5.2, but Technical Support is still investigating that after reproducing the issues.

AbrahamAlejandroAlvarezReyna
New Contributor

I am having the same issue. I cannot run a code in python due to the SSL CERTIFICATE ERROR. and I can add packages because I can't clone the environment. In other words, problem after problem after problem. So how can I clone the env, to begin with? I used the attempts at the top comments but still had not luck.

0 Kudos
MonicaRodriguez
New Contributor

Beginner to GIS Python here -

The advice of creating a new folder in your C-drive before cloning resolved my issue. I renamed the new folder with the same suggestion Mitch Hoelley gave (arcgispro-py3-username) in my ESRI C-drive. I also made the 'home folder' in the options tab of the project match the new folder name ('C:\EsriPress\arcgispro-py3-username'). I'm not sure if that step is necessary but the clone finally worked after I adjusted the destination folder.

0 Kudos
desalas
New Contributor II

I am working with 2.6.1 and ran into the same problem. In this instance it was an easy fix. I am working from home (who isn't nowadays) and was connected via VPN to the office network. Once I disconnected VPN it all went swimmingly. 

0 Kudos
Jen_Zumbado-Hannibal
Occasional Contributor

Hello friends, 

I followed @MitchHolley1  advice. However, a word of warning for all you using v 2.8...before I follow the instructions provided I just wanted to make sure that the non-working clone was taken off the list of environments in manager. 

When I clicked on removed...I went to my user folder and I couldn't find the envs folder. It was gone! Puff! Naturally, I thought that taken the path from the list of environments would delete it from the list and NOT THE ACTUAL FOLDER. 

No biggie. Just copied the envs folder from 'C:\Program Files\ArcGIS\Pro\bin\Python\envs' and pasted it back in 'C:\Users\nameuser\AppData\Local\ESRI\conda\envs'. 

But for awhile there I was sweating /:{ 

Jen Zumbado-Hannibal, GISP
GIS Coordinator
City of Forest Grove
Forest Grove, OR 97116

0 Kudos
RobertThomson
Occasional Contributor II

What worked for me was to open Explorer and go to C:\Program Files\ArcGIS.  Then right click on the folder. properties and then security. Under "Group or user names" scroll down to Users and select.  Then click the Edit button. Again Under "Group or user names" scroll down to Users and select.   Under "Permission for users" click on Allow -Full Control and Modify. Then OK.  After this I was able to clone the environment and add new packages.

Windows 10 seems to be the culprit here, I have seen other permission issues with it.

JohnnyGumball
New Contributor

this is still an issue. Your solution solved my cloning problem on a fresh pro install on a windows 10 machine.

0 Kudos