Select to view content in your preferred language

ArcGIS Server 11.3 Python Conda Proup Command Issues

235
5
Jump to solution
Tuesday
AlexWardle_IDITS
Emerging Contributor

Working on doing an upgrade of a python environment from ArcGIS 10.9.1 to 11.3 using the conda proup command and this ESRI article. I have made sure that all permissions are properly set in the environment and running the command prompt as Administrator. 

We are running Arc GIS Enterprise 11.3 on Windows Server 2019. 

Are there error logs that we should be looking at. Any Ideas on what to try next?

This is what I am getting when running the command. 

(ScheduledTasks) C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3>conda proup -n ScheduledTasks --force
Collecting packages...
Upgrading environment at 'C:\\Program Files\\ArcGIS\\Server\\framework\\runtime\\ArcGIS\\bin\\Python\\envs\\ScheduledTasks' with backup at C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\ScheduledTasks.tar.bz2
Detected packages added to environment:
  conda: simplejson pip-system-certs
Backing up environment to C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\ScheduledTasks.tar.bz2
Collecting packages...
Packing environment at 'C:\\Program Files\\ArcGIS\\Server\\framework\\runtime\\ArcGIS\\bin\\Python\\envs\\ScheduledTasks' to 'C:\\Program Files\\ArcGIS\\Server\\framework\\runtime\\ArcGIS\\bin\\Python\\envs\\ScheduledTasks.tar.bz2'
[########################################] | 100% Completed | 42.8s
Deleting C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\ScheduledTasks for in-place upgrade
Cloning arcgispro-py3 to C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\ScheduledTasks...
CondaProupError: Unable to create env at C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\ScheduledTasks, conda create failed

 

1 Solution

Accepted Solutions
AlexWardle_IDITS
Emerging Contributor

I fixed the issue, for those with SSL Inspection on the firewall. I first copied our root ca cert and put it in the following file "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\certifi\cacert.pem"

After adding the Cert to that file in the Command Prompt Ran this command: conda config --set ssl_verify "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\certifi\cacert.pem" 

I then was able to create a test environment to make sure the SSL Verify was working as expected.

View solution in original post

5 Replies
DavidColey
MVP Frequent Contributor

Well, in Pro you can't create a clone of the python env at the "C:\\Program Files\. . ."  location because that location is always write protected. 

I would set up something like a "C:\\pyclone\envs\ . . ." directory, making sure the ArcGIS Server service account has read write permissions to the directory and then clone the default environment to that directory. 

Then you can activate the new environment, run any conda updates and install any custom libraries...

0 Kudos
Priya_Das
Esri Contributor

Hi @AlexWardle_IDITS,

Make sure you're executing the command in an elevated command prompt or PowerShell window as an Administraror. Also, try manually creating the environment to isolate the issue to test the Conda Env.

0 Kudos
AlexWardle_IDITS
Emerging Contributor

So I have copied the environment from the program files folder and put it in a separate folder called E:\pyclone\envs and it is still doing the same thing. I have verified that the gis service account has full permissions to this directory. I am running CMD as administrator and I have also tried it from the Python 3 Command Prompt as Administrator as well. 

(arcgispro-py3) C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3>conda proup -p E:\pyclone\envs\ScheduledTasks
Collecting packages...
Upgrading environment at 'E:\\pyclone\\envs\\ScheduledTasks' with backup at E:\pyclone\envs\ScheduledTasks.tar.bz2
Detected packages added to environment:
  conda: pip-system-certs simplejson
Backing up environment to E:\pyclone\envs\ScheduledTasks.tar.bz2
Collecting packages...
Packing environment at 'E:\\pyclone\\envs\\ScheduledTasks' to 'E:\\pyclone\\envs\\ScheduledTasks.tar.bz2'
[########################################] | 100% Completed | 39.8s
Deleting E:\pyclone\envs\ScheduledTasks for in-place upgrade
Cloning arcgispro-py3 to E:\pyclone\envs\ScheduledTasks...
CondaProupError: Unable to create env at E:\pyclone\envs\ScheduledTasks, conda create failed

 

 

0 Kudos
AlexWardle_IDITS
Emerging Contributor

Well I think I found the issue while creating a new test env, looks to be an SSL Certificate issue. The conda.anaconda.org website goes through our firewall with ssl inspection. is there a command that I can use to specify our root cert that the firewall uses?

CondaSSLError: Encountered an SSL error. Most likely a certificate verification issue.
 
Exception: HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /esri/win-64/c-ares-1.19.1-0.conda (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))

 

0 Kudos
AlexWardle_IDITS
Emerging Contributor

I fixed the issue, for those with SSL Inspection on the firewall. I first copied our root ca cert and put it in the following file "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\certifi\cacert.pem"

After adding the Cert to that file in the Command Prompt Ran this command: conda config --set ssl_verify "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Lib\site-packages\certifi\cacert.pem" 

I then was able to create a test environment to make sure the SSL Verify was working as expected.