RuntimeError: The Product License has not been initialized when trying to clone Python environment via Anaconda Prompt

04-27-2021 04:48 PM
Labels (2)
New Contributor III

I am trying to clone my arcgispro-py3 Python environment with the default path  C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3. I want to clone it to a location that 1) I can access without admin rights and 2 ) will be recognized when I list out environments in Anaconda Prompt with conda env list. I need to clone it because I need it to be in a location that I can make changes to (e.g. install additional python packages to). I am following the instructions from How To: Clone a Python environment with the Python Command Prompt (

If I make a clone arcgispro-py3 via Python Command prompt with a specified path (conda create --clone arcgispro-py3 --name C:\Users\me\Documents\Conda_Clone\arcgispro-py3_clone), the clone is created successfully. However, since I am placing the conda environment outside of the default envs folder, the environment is not named (i.e. I cannot refer to it with --name nor is it listed with conda env list in the Python Command Prompt).

In order to have the clone named, I tried cloning it to my default envs folder two ways. My first attempt was via Python Command prompt (conda create --clone arcgispro-py3 --name C:\Users\me\Anaconda3\envs\arcgispro-py3_clone). This attempt does nothing and prints out Access is denied.

My second attempt was with Anaconda Prompt (with base environment activated) :

conda create --clone "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3" --name arcgispro-py3_clone

With this Anaconda Prompt attempt, I receive:

File "C:\Users\me\Anaconda3\envs\arcgispro-py3_clone\lib\site-packages\arcgisscripting\", line 128, in <module>
from ._arcgisscripting import *
RuntimeError: The Product License has not been initialized.

My main question is: How can I clone my arcgispro-py3 python environment as a named environment to my default envs folder?

Also out of curiosity:

Why do I suddenly have licensing issues when cloning to one directory as opposed to another?

Why does cloning an arcgispro-py3 python environment perform differently via Anaconda prompt vs. Python Command Prompt?

0 Kudos
3 Replies
MVP Esteemed Contributor

If you are using Pro 2.7, you might just want to follow the help topic

Work with Python environments—ArcGIS Pro | Documentation

since there is no Pro 2.6 for that help topic, it might have changed.

It appears that you want it in your User folder in any event

... sort of retired...
New Contributor III

Thanks Dan,

Unfortunately the manual way doesn't seem to give me an option to choose the directory it will be created in.

0 Kudos
New Contributor III

My work around for this ended up being uninstalling Pro and then reinstalling but this time instead of for all users, I installed for a single user to a location where I had read/write access to. I then reinstalled Anaconda to the default install location, installed for single user and uncheck both options (set path and set as default python).

I was then able to clone my arcgispro-py3 environment via python command prompt with: 

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

0 Kudos