Select to view content in your preferred language

Upon loading ArcGIS Pro 2.0, I get "Failed to Initialize Python Interpreter."

2227
3
07-27-2017 10:19 AM
EricEagle
Frequent Contributor

I made a comment on an existing topic, but I figured that it was probably better to ask this as its own question.

I installed ArcGIS Pro 2.0 yesterday.  When trying to launch the Python CLI, it states in angry red letters, "Failed to initialize Python Interpreter."

I am on Windows 7 x64.  ArcGIS Pro 2 was installed to:

C:\Users\[my username]\AppData\Local\ArcGIS\Pro

Prior to this, the Python that comes with ArcMap 10.5 was my system python.

I also do open-source GIS development on this workstation.  Here is what my environment variables (user) look like.  I've tried adding some things into the PYTHONPATH variable to see if I can't make it work - so this is for testing purposes only.

GDAL_DATA=C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo\data\gdal

GDAL_DRIVER_PATH=C:\Python27\ArcGIS10.5\Lib\site-packages\osgeo

PATH=...C:\Users\[username]\AppData\..\Pro\bin\Python;..\..\Pro\bin\Python\Scripts;..\..\Pro\bin\Python\envs\arcgispro-py3;..\..\Pro\bin\Python\envs\arcgispro-py3\Scripts

PIP_CONFIG_FILE=C:\Users\[username]\AppData\Roaming\Python\pip.conf

PYTHONPATH=..\..\Pro\bin\Python\envs\arcgispro-py3;..\..\Pro\bin\Python\envs\arcgispro-py3\Scripts

Obviously there are some path issues.  When I fire up a Windows CLI I do get into the arcgispro-py3 python instance, but I feel I'm "doing it wrong."

When I type in "conda" I get the errors:

File "conda\cli\main.py", line 222, in <module>

File "conda\cli\main.py", line 185, in pre

File "conda\base\context.py", line 274, in envs_dirs

File "conda\base\context.py", line 270, in root_writable

File "conda\gateways\disk\test.py", line 66, in prefix_is_writable

conda.CondaError: Unable to determine if prefix 'C:\ArcGISPro\bin\Python' is writable.

Since nothing is IN C:\ArcGISPro\bin\Python (that's not where ArcGIS Pro was installed), I removed the path.  Now it says,

conda.CondaError: Unable to determine if prefix 'C:\Users\[username]\AppData\Local\Temp\1\[directory name changes each time]' is writable.  Failed to execute script main

So, the problem is twofold:

1. I cannot get at a Python CLI in the Pro interface.

2. I cannot 'conda' anything from CLI.

Any help appreciated!  Please no voodoo suggestions like "just uninstall everything and run a registry cleaner" because I am not an administrator on this workstation.

Tags (3)
0 Kudos
3 Replies
ClintonDow1
Frequent Contributor

(Continued conversation from https://community.esri.com/thread/192139-arcgis-pro-141-failed-to-load-system-tools-please-restart-a... )

Based off your comment "I had ArcGIS Pro 1.4 installed to C:\ArcGISPro because it gave me an option of where I wanted to install it." In the other thread, and seeing the line conda.CondaError: Unable to determine if prefix 'C:\ArcGISPro\bin\Python' is writable I think your registry is still pointing to the 1.4 install. We use the paths set in the registry for some of the bootstrapping our envs need to do to avoid PATH collisions. Are you able to run regedit or is that not possible on this machine?  

0 Kudos
EricEagle
Frequent Contributor

Hi Clinton,

Okay, after some tedious combing through Windows registry entries, I see what happened and it is as you say.

ArcGIS Pro 1.4 was installed to C:\ArcGISPro.

ArcGIS Pro 2.0 was installed to my local profile.  The two installs never talked.

The old version of ArcGIS Pro left behind a number of registry entries for python root pointing to C:\ArcGISPro.

Once I uninstalled the old version of ArcGIS Pro in a separate action, it cleaned up the registry and now I have python access within ArcGIS Pro 2.0.

Now, I guess as a consequence, conda works; and once I pointed it at a local repository, I'm able to create environments no problem.  Everything works!*

I'll leave the question in place I guess, just in case anyone else may run into the same problem.

*Everything works so far

DanPatterson_Retired
MVP Emeritus

as responded to in your other thread.... make sure you are aware of whether you are installing Pro for 'all users' or just you.  In the all users option, Pro is installed in a different folder (Program Files I think)... If 'just you' you have full control as to whether it can be installed... no registry problems result.

0 Kudos