6/29/2023 0 Comments List conda environments![]() ![]() Once it’s complete, you can use your new conda environment by running proswap.bat newenv. As a matter of practice, I find that I often want to call activate.bat newenv (located in the Scripts directory as well) any time I’ll be working on the command line for the feature of having it call the python.exe in the environment – proswap seems to set the right settings, but on the command line won’t necessarily always make “python” reference the correct executable. ![]() Fortunately Esri prepared for this! Instead of conda activate, you’ll need to use proswap.bat located in C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\. If they aren’t, and you use standard conda methods to switch environments, like “conda activate newenv”, then you’ll get a full interpreter crash. Working with your conda envĪrcGIS Pro’s python install needs a few registry keys set correctly for the conda environment – I learned this the hard way. And that’s how it’s worked with virtualenv and previous upgrades of ArcGIS Pro anyway – the virtualenv would need to be recreated, so we’re no worse off. More generally, it might break when ArcGIS Pro upgrades (but that’s what requirements.txt, etc is for), so you’d need to recreate it – we’ll find out. Still, it needs to be worked with the right way – we can’t just use “conda activate” or we’ll get interpreter crashes – see below for more. That’s it for creating it- it might be a silly hack, but it works, and maintains isolation when installing packages into it. Rename the pasted folder to what you want your conda environment to be named.This folder is ArcGIS Pro’s default conda environment, and we need to clone it to have access to arcpy, and the other dependencies Copy and paste the existing folder to duplicate it, named arcgispro-p圓.In Windows Explorer, navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs (Once again, assuming ArcGIS Pro installed to default location).I ultimately got it working by manually making a new conda environment. ![]() I was unable to get that last command to run completely without failing on either pandas, numpy, scipy, or another package, despite multiple attempts and multiple variants. Should, but didn’t – that method isn’t yet supported by ArcGIS Pro – I’m told by an Esri engineer that they’re working on it. That last command should clone the existing ArcGIS Pro virtual environment.
0 Comments
Leave a Reply. |