I am working on custom Add In in ArcGIS Pro 3.0 using ArcGIS Pro 3.0 SDK for .NET, for this I need to check if the file exists in the site-packages folder in my active (cloned) environment.
Please let me know how to find the path of the active environment in C#.Net.
Thanks.
Solved! Go to Solution.
Hi,
You can read it from computer registry:
Code to read value:
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\ESRI\ArcGISPro");
object activeEnv = registryKey.GetValue("PythonCondaEnv");
object envPath = registryKey.GetValue("PythonCondaRoot");
Hi,
You can read it from computer registry:
Code to read value:
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\ESRI\ArcGISPro");
object activeEnv = registryKey.GetValue("PythonCondaEnv");
object envPath = registryKey.GetValue("PythonCondaRoot");
Hi GintautasKmieliauskas,
Thank you for your message. Now I able to read the active ( cloned) environment from the Registry key HKEY_CURRENT_USER.