Select to view content in your preferred language

Cloning a python environment

2794
7
01-20-2022 04:22 AM
RyanDavidson1
Occasional Contributor

Hi!

I'm a beginner with Object detection and am trying to go through the process of installing Deep learning libraries. I have been following the workflow in this link

Performing Feature Extraction & Classification Using Deep Learning with ArcGIS Pro (esri.com)

aswell as this

Deep Learning with ArcGIS Pro Tips & Tricks: Part 1 (esri.com)

I have hit a wall when trying to clone the default python environment, i get an error and the cloning step doesn't finalize. 

Is cloning the environment a must do? Or can i just skip that part?

 

Arcgis Pro 2.9.1

Windows 11 education

0 Kudos
7 Replies
Luke_Pinner
MVP Regular Contributor

How are you trying to clone (conda command or ArcGIS Pro Python Package Manager GUI)? What is the error message? Are you in a corporate environment with restrictive IT security? 

0 Kudos
RyanDavidson1
Occasional Contributor

In the python package manager, It starts to install packages into the clone but it seems to gets stuck on 'torch_geometric-1.7.2'

Error message is

ERROR conda.core.link:_execute(700): An error occurred while installing package 'defaults::scikit-learn-0.24.2-py37hf11a4ad_1'.

LinkError: post-link script failed for package defaults::scikit-learn-0.24.2-py37hf11a4ad_1
location of failed script: C:\Users\Ryan\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone-1\Scripts\.scikit-learn-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:
stderr: 'conda' is not recognized as an internal or external command,

0 Kudos
Luke_Pinner
MVP Regular Contributor

Looks like the .scikit-learn-post-link.bat can't find the conda command, try adding the directory that conda is installed to to your PATH environment variable.

Close Pro. Click your Start Menu and start typing environ, select "Edit environment variables for your account" add a new entry to the PATH variable "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts". Then reopen Pro, go to  the Python Package Manager and try the clone again.

AaronKoelker
Frequent Contributor

@Luke_Pinner Thanks so much, had the same problem and this did the trick for me. Had tried reinstalling Pro but that didn't solve it. Not on any sort of work or school network as Ryan suggested, so not sure what causes this. 

-Aaron
ColinCate4
New Contributor

Thank you Luke. This worked for me as well!

0 Kudos
RyanDavidson1
Occasional Contributor

I'm on a university network so there could be some security issue i guess, either way i'd like to overcome that.

0 Kudos
DanPatterson
MVP Esteemed Contributor
0 Kudos