Python window and Geoprocessing inputs crash ArcGIS Pro after installing ArcGIS API for Python

1284
8
05-18-2017 08:51 AM
DrewWilkie1
New Contributor

After installing ArcGIS API for Python, inputs into the Python window and Geoprocessing tools cause ArcGIS Pro to crash immediately.  I also cannot publish web services to Portal any longer since the install.

Any help would be much appreciated!

0 Kudos
8 Replies
AtmaMani
Esri Contributor

Can you give the following details

  1. How did you install the Python API? - Using Python Package Manager of Pro or using Python Command Prompt by typing `conda install -c esri arcgis` command?
  2. You version of Python API installed
  3. Your Pro build version - you can get this from 'About' section of Pro
  4. Your Pro install location, is it in C:\Program Files\ArcGIS.. or in your user profile (such as C:\users\username\ProgramData\)
0 Kudos
DrewWilkie1
New Contributor

1. Pro's Python Package Manager

2. It defaulted to an older version, (.3 I believe) I uninstalled and re-installed the newer version(1.x) which did not resolve the issue.

3. Pro 1.4.1

4 C:\Program Files\ArcGIS\Pro

0 Kudos
AtmaMani
Esri Contributor

Thank you, I will send this over a colleague of mine to investigate this.

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Hello Drew,

Continuum recently upgraded their Python package, which altered the DLLs which are included with the Python distribution. To fix this, there are a few options, but the simplest is to navigate to your environment directory (which should be C:\Program Files\ArcGIS\Pro\envs\arcgispro-py3) and move the python3.dll file there to another location. Try starting Pro with that file removed, and see if Python works correctly from within Pro.

Another option is to restore the original Python package, but the above should allow you to continue using the newest Python package alongside Pro.

Cheers,

Shaun

0 Kudos
DrewWilkie1
New Contributor

Shaun,

I am very interested in utilizing the capabilities of the ArcGIS API for Python, though I'm not sure I have the bandwidth necessary to test these scenarios.  That's not to say that I won't in the future...

In the meantime, and based on this first pass experience, I am hesitant to have the package interact with my Portal environment.  I am a small shop that does not have the luxury of dev/test/prod environments.

Have you seen successful implementations of using the API to execute the "Overwrite Web Layers" in a localized Pro/Portal environment? 

Thanks,

Drew

0 Kudos
AtmaMani
Esri Contributor

Drew,

Overwriting web layers is possible. Check out this sample: https://github.com/Esri/arcgis-python-api/blob/dev/samples/05_content_publishers/overwriting_feature... This sample and the code behind is still in beta. To get this capability, you need to upgrade your ArcGIS API for Python package from 1.0.1 to 1.2.beta2 using the following command typed in the Python Command Prompt that ships with ArcGIS Pro

conda upgrade -c esri/label/beta2 arcgis
0 Kudos
RachelAlbritton
Occasional Contributor III

Atma - 

I am having a similar problem when accessing the python window from ArcGIS Pro.

I updated ArcGIS Pro today to version 2.0.1.

I also tried to open python manually by going to \ArcGIS\Pro\bin\Python\envs\arcgispro-py3 and it crashed there as well. I get the following error:

Any input would be appreciated. 

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Are you getting that error after import arcpy, or from a Python.exe session without any further steps? I'd try renaming your existing arcgispro-py3 directory, then running the repair for ArcGIS Pro 2.0, and it should lay down a new initial valid copy of the arcgispro-py3 environment.

Cheers, Shaun