3

I'm trying to get arcpy to work in Pycharm. I've done this successfully in the past. However, now when I try to do anything involving arcpy in Pycharm, the program runs then hangs forever. I have it down to a simple print statement. When I import arcpy it prints but hangs. When I remove arcpy it prints and exits. Any ideas? I just reinstalled both arc and pycharm. I don't think it would have anything to do with the fact I'm using arcgis 10.4?

import arcpy
print 'why is this not exiting?'
  • Do you have multiple versions of Python installed? Perhaps there is a problem with your system paths, and it can't find arcpy? – dslamb May 16 '16 at 12:47
1

Found a solution for my problem: When debugging the import of arcpy with stepping in the import process, I found that the import of the Toolboxes of some extensions hanged. In my case, these were the extensions AGD data reviewer and AGD workflow manager. After deinstalling these extensions, arcpy could be imported (e.g. in Idle for Python 2.7.5). These are the only extensions which had separate Installers in my case

Remark:

  • I've done lot of empirical problem soving before (removing Normal.txt, removing Arcmap folder in Roaming Profile, installing and Reinstalling AGD,..). So I don't know exactly if all of this is necessary

  • my Environment: windows 7, arcgis 10.2.2

  • the question is: why does this happen now? I did not update any AGD SW before ...

1

The reason for this is that the debugger has put a lock on ArcCatalog.gx. Here is a fix which would save your roaming profile.

  1. Close ArcGIS Desktop
  2. Close Python IDE
  3. Go to C:\users\\ Roaming
  4. Rename ESRI folder to ESRI_Keep
  5. Reopen Python IDE
  6. Run python debugger

This will create a new ESRI folder.

  1. Close Python IDE
  2. Delete C:\users\\ Roaming\ESRI
  3. Rename ESRI_Keep folder to ESRI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.