clone python env is not the same if I do it with ArcGIS Pro 2.6 or on the commandline

217
3
08-09-2020 04:24 AM
StefanFlury1
New Contributor

What is the best way to cloen python? I like to add new modules and in a old post I read that I sholud not install them (pip install ....) to the default env (arcgispro-py3). So I cloned Python wih ArcGIS Pro but with conda env list I could not find the cloned env. How can I clone on the commandline the python env? I wolud like to setup a Python env reproducible. Does conda create --name myClone --clone arcgispro-py3 the same as a clone with ArcGIS Pro? CanI share this env also with others?

0 Kudos
3 Replies
StefanFlury1
New Contributor

if I do a clone wtith conda clone I can add this new environment to ArcGIS Pro. If I do it with conda-env export ... and conda-env creat I can't add the new environment.

0 Kudos
Arne_Gelfert
Regular Contributor

Sounds like you got it working then? For me the following works ...

conda create --clone arcgispro-py3 --name arcgispro-clone

I don't clone my environments very often, so I'm not sure how many others way to do this there are. The export route works for me when I try this:

 

# Pick the environment to clone
activate <your-environment>

# Dump the environment into a file
conda env export > c:\temp\test.yaml

# Create new environment from that file
conda env create --file c:\temp\test.yaml -n test‍‍‍‍‍‍‍‍
0 Kudos
StefanFlury1
New Contributor

Yes I got it working. And I could also add new modules and update existing modules. Problem solved

0 Kudos