POST
|
Win11 on Pro 3.4 Hi, I'm trying to clone (on a relatively new machine) the python envionment using the clone button in package manager. It gets along quite far in the process then gives out an error: ERROR conda.core.link:_execute(950): An error occurred while installing package 'esri::arcpy-base-3.4-py311_55347'. Can anyone help? Is this a permissions issue perhaps, as we are newly working under a more restrictive environment where we can't install software when and where we want? I haven't installed conda or have another Python envionemnt installed. Only the default one by Pro 3.4 and ArcMap 10.5 (Python 2.7).
... View more
a month ago
|
0
|
2
|
448
|
POST
|
actually its not 100% - becaue if you try to upgrade to 3.5 from 3.2 on nuget it will fail because the .net version dependancies are incorrect, so it will revert back to the 3.2 package. Just worth noting for others, rather than me just being a pedant.
... View more
08-22-2025
02:27 AM
|
1
|
0
|
178
|
POST
|
When I'm following this guidance - I am having to develop against 3.2 or Pro - but it says in the help you should install the latest version of the nuget package for Esri.ArcGISPro.Extensions30. Should I install the latest as advised or pick one that matches the 3.2 version? https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-ArcGIS-Pro-Extensions-NuGet
... View more
08-21-2025
07:41 AM
|
0
|
2
|
227
|
POST
|
HI - Yes I did try this but it didn't help - however I have changed tack and have worked how to leverage using a python toolbox from c# - and that seems to work much better.
... View more
05-28-2025
02:52 AM
|
0
|
0
|
676
|
POST
|
Thanks for the deep dive on this Dan - always interesting to know the finer details about how all these environments are managed. Cheers
... View more
05-21-2025
01:01 AM
|
0
|
0
|
1090
|
POST
|
Yeh - I tried that - still broken. However I have now deleted every last remnant of Pro and uninstalled everything and cleaned out the Registry - that seems to have done the trick - but what a PITA!!!! Thanks for your help though.
... View more
05-21-2025
01:01 AM
|
0
|
2
|
1090
|
POST
|
I will have a try - when I've uncorrupted my python environments with Pro. 😞
... View more
05-19-2025
02:14 AM
|
0
|
0
|
770
|
POST
|
I can't remember exactly Dan - it said something like failed to install, freezing something and then took a few hours and then seemed to successfully install from conda forge - but it's well and truly screwed things up - and I'm surprised at that because I did all this in a cloned environment, not the native ESRI one.
... View more
05-19-2025
02:02 AM
|
0
|
2
|
1203
|
POST
|
Unfortunately the swap command didn't change anything and it still doesn't like it's environment - even though this is now the second time I have installed it afresh.
... View more
05-19-2025
02:00 AM
|
0
|
4
|
1203
|
POST
|
Hi, I have created a cloned copy of the default python environment. For convenience, I put the Conda command on the PATH system variable by adding "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts". I used the Conda Forge command from a command prompt (running as Administrator, might not be necessary, but why not) to install pygplates: conda install conda-forge::pygplates When you try and access Package Manager ArcGIS Pro crashes. Not sure how to get out of this mess or even fix my environment - it's a bit annoying that Pro just crashes out just like this - looks like I'm looking at a re-install and all the messing about that involves.
... View more
05-16-2025
07:18 AM
|
0
|
10
|
1366
|
POST
|
Hi Richard, thanks for the answer - I will research the first part of your reply. However I think programmatically activating environments in Pro - would be problematic (even if its possible) as you have to restart Pro which would obviously disrupt the user experience and render the add-in unusable.
... View more
05-15-2025
01:28 PM
|
0
|
0
|
833
|
POST
|
Hi, I’m hoping to get some insight or advice from the community on an issue we’re encountering with a custom ArcGIS Pro Add-in developed in C#. Software Stack: ArcGIS Pro 3.2.4 (Advanced + Spatial Analyst) Windows 10 Pro (Build 19045.5737) Visual Studio 2022 (v17.13.6) Python environments: arcgispro-py3 (default) and a separate standalone Python 3.9 installation (required for pygplates) Objective We have a custom Add-in button that runs two Python scripts in sequence: Script 1 runs using the ArcGIS Pro environment (propy.bat). Script 2 runs in an external standalone Python 3.9 environment (due to dependency conflicts with pygplates). Script 1 runs again for some arcpy based clean up and other misc stuff. This all works well until the user manually adds a raster to the map (via Map → Add Data → Data). After doing this, the second script fails when executed via the standalone environment. This is not the only thing that causes this problem - if the user opens up the interactive Python prompt in Pro - that causes the same issue. Symptoms After adding a raster in the Pro UI, attempts to run the tool again affects the external Python script fail with errors like: Fatal Python error: init_import_site: Failed to import the site module ... TypeError: type 'types.GenericAlias' is not an acceptable base type If we run the same scripts from a standalone .NET Console app (i.e., not from within Pro), the scripts work perfectly, so I know it's nothing to do with scripts themselves. The same scripts also work perfectly if run within a Python Toolbox - its only if the scripts are triggered from C# using the System.Diagnostics.Process instance. See code example below: public static string RunPythonScript(string scriptFileName, string[] scriptArguments, string pythonPath)
{
string scriptPath = Path.Combine(@"D:\Projects\FooProject\PythonScripts", scriptFileName);
if (!File.Exists(scriptPath))
return "Python script not found.";
if (string.IsNullOrWhiteSpace(pythonPath))
pythonPath = GetPythonPath();
if (string.IsNullOrWhiteSpace(pythonPath))
return "Python environment not found.";
var args = new StringBuilder($"\"{scriptPath}\"");
if (scriptArguments != null)
{
foreach (var arg in scriptArguments)
args.Append($" \"{arg}\"");
}
var startInfo = new ProcessStartInfo
{
FileName = pythonPath,
Arguments = args.ToString(),
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
};
using var process = new Process { StartInfo = startInfo };
process.Start();
string output = process.StandardOutput.ReadToEnd();
process.WaitForExit();
return output;
} Question to the Community Has anyone else encountered issues with the Pro environment interfering with external Python script execution from within a C# Add-in? Is there a known workaround for running Python scripts in multiple environments from a Pro Add-in? Could Pro be “locking” or initializing some internal Python state that affects subprocesses? I appreciate this will probably be something to do with Conda and the internally installed Python environment Pro installs. Is there a recommended pattern for isolating or sandboxing these environments in a Pro-based C# add-in workflow? Why It Matters Our workflow depends on Python packages that cannot be installed in the default ArcGIS Pro environment (e.g., pygplates). Being able to reliably switch environments from a Pro Add-in is essential for our tool to function correctly and do the calculations we need to do with pygplates. Currently, interaction with the native Pro UI (like adding rasters) breaks that workflow and puts pro into some locked state with the default Python environment. Would appreciate any insights, workarounds, or confirmation if others have seen similar behavior. Thanks in advance!
... View more
05-14-2025
08:30 AM
|
0
|
5
|
899
|
POST
|
Wow - just as simple as that! Good to know about the stackpanel limitations though. Thanks for helping!
... View more
10-28-2024
09:36 AM
|
0
|
0
|
715
|
POST
|
Hi, Sorry for the delay - I was just finishing off some work and I have created a visual studio project with an add-in only showing 2 tabcontrols on a dockpane which shows the issue I originally raised. This should help you troubleshoot much more easily the problem I was having. I look forward to hearing your findings.
... View more
10-28-2024
05:14 AM
|
0
|
1
|
720
|
POST
|
Hi. I have followed some ESRI sample code for putting tabs on a dockpane. See this: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#tabindicator It works well - however if I want to make a button stick to the bottom (with a margin round it) and kind of have it separate itself away from all other controls on the dockpane - I find it almost impossible to figure out because you have to use a ContentPresenter - a kind of template dockpane and I think all the height sizing parameters go haywire! Whats doubly annoying is that at design time - it looks fine but when you look at the actual control at run time it does not behave - can anyone suggest the correct XAML as I have lost hours on this and I can't waste anymore development time on this - see the screen shots: Design Time: Runtime:
... View more
10-23-2024
09:40 AM
|
0
|
4
|
798
|
Title | Kudos | Posted |
---|---|---|
1 | 08-22-2025 02:27 AM | |
1 | 12-19-2023 01:36 AM | |
1 | 12-21-2023 04:02 AM | |
1 | 05-27-2021 10:01 AM | |
1 | 05-05-2021 01:32 AM |
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|