PROBLEM
Those who work with standalone Python scripts commonly use the Python IDLE that comes with ArcGIS Pro. This IDLE resides in the Python environment that ArcGIS Pro uses. Each clone of the default Python environment should also contain the IDLE. This means that when scripts are run with this IDLE, the Python environment that contains arcpy is automatically used. This allows users to work with the arcpy library and included tools. To easily access this IDLE, users typically right-click on a Python script (.py) and choose "Edit with IDLE (ArcGIS Pro)", as shown in the image below. Other 'Edit with IDLE' options do not guarantee that the IDLE with the correct Python environment will be used. Not using the correct IDLE is a common cause of errors related to the "import arcpy" command.

With the deprecation of Windows 10, many users have now migrated to Windows 11. This has resulted in some users noticing the "Edit with IDLE (ArcGIS Pro)" option not appearing. Other causes of this missing option may be related to registry editing being blocked or customized, or different installation locations for virtual or cloud machines. Ultimately, there is a registry key value that is responsible for enabling this option. This key value or key value path may be modified or missing.
Many issues with registry keys can be alleviated by reinstalling ArcGIS Pro or performing a Soft Reset. Should these methods not alleviate the issue, try the following:
Warning: The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult a qualified computer systems professional, if necessary.
Esri cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.

Computer\HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE (ArcGIS Pro)\command
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\pythonw.exe" "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\idlelib\idle.pyw" -e "%1"

Article ID: 000040993
Get help from ArcGIS experts
Start chatting now