Select to view content in your preferred language

What is conda-env.exe?

601
1
04-23-2023 09:22 AM
KeithDesertspring
New Contributor II

I'm attempting to configure Visual Studio Code for use with Pro 3.1's python environment and ran into a problem. I was able to solve it, but it got me wondering about what is the "correct" way of configuring this setup. 

The problem was with importing arcpy in an interactive notebook session. If VS Code is configured to use conda.exe for activation (C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe) the kerel crashes when executing

import arcpy

 

It's a hard crash with no useful error messages emitted, and non-ESRI packages import just fine. On a whim I switched to conda-env.exe, and that seems to have solved the problem.

Now I'm curious about this "special" conda executable, as well as the one named conda-proup.exe. How are these different than conda.exe? 

And more generally, has ESRI released any official documentation on how to properly use VS Code for developing against the ESRI Python ecosystem? 

0 Kudos
1 Reply
EvelynHsu
New Contributor III

You might want to consult this link: https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/using-conda-with-arcgis-pro.htm 

 

I'm using VS code too, using the python environmnt from ArcGIS Pro. In my VS code configuration I basically set the python.exe path from Pro as my default python interpreter, and it's been working fine.

0 Kudos