I have had to reinstall ArcGIS Pro 2.0 and have attempted to recreate an Anaconda environment, but am running into some problems. When I create a new environment from the initial ArcGIS Pro environment, I can install packages using pip, but then when I try to load them from within the cloned environment, the modules can't be found. Here are the steps I performed.
- Open Command Prompt as provided by ArcGIS Pro (not in the GUI)
conda create --clone old --name new
activate new
pip install package
python -c "import package"
This results in an error message. Within the new environment, sys.executable
returns the old environment. If I provide the hard path the python executable in the new environment, I can load the package. But this behavior doesn't seem right. I am assuming that when I try to open python within an Anaconda environment it should use the environment's python version.
Best Answer
You may just want to move up to later version of ArcGIS Pro.
Your expectation matches the 2.2 behavior nicely.
2.2 session below (sanitized for noise).