Python – Using Notepad++ to Write Python Scripts for ArcGIS Pro

arcgis-proarcpynotepadpython

I am using Notepad++ and I have set the "RUN" command to use the ArcGIS Pro Python executable located at "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"

Once I hit Run, however, I get the following message:

Warning:
This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment see https://conda.io/activation

When I went to that website, it told me to run c:\Anaconda3\Scripts\activate base. I do not have that directory.

What should I do to get this working?

Best Answer

From the documentation:

C:\Program Files\ArcGIS\Pro\bin\Python\scripts\propy.bat my_script.py

But you could also switch to a code editor/IDE that understands conda environments like VS Code or PyCharm.

Related Question