Has anyone had issues cloning or adding environments since the 2.3.1 upgrade? My script that uses the OpenCV package no longer runs in Arc and when I looked that package was no longer installed so I went to install it but it was greyed out, so I went to clone or add an environment in which I could install it again and it won't even let me do that. Any help? It worked fine before the upgrade.
How did you upgrade to 2.3.1? I did an actual upgrade to 2.3 and had to re-clone. I then used the Updates Available button to get to to 2.3.1. I don't use opencv, but I see I can add it as a package if I want to... IMHO, the whole python/conda/package thing is a bun that needs to go back in the oven....
Hi Joe, I just used the Updates Available Button too. I used to be able to see OpenCV as something I could install, but couldn't through the package manager, so I did it previously through command prompt. Now the button for it (and all the other packages) are greyed out.
How are you cloning?
How are you trying to install packages in the clone? (package manager or conda?)
Hi Dan, I've tried both cloning the default (which unsurprisingly didn't work because I am on a government computer and don't have access to anything under C:\Program Files) and then adding a new environment which looked like it was working and then failed. In addition I have two broken environments that cannot be activated, a backup of the default, and one that I had previously added myself under C:\Users (C:\Users\FarineauA\AppData\Local\ESRI\conda\envs\my_arcgispro-py3.
I have attempted to install opencv through the python command prompt as this is how it worked last time, but I got this message:
I would check to make sure what you want to install
opencv version 3.4.2 is part of esri's distribution
Hello Anne,
Sorry to hear of the trouble you're having with your environments. There shouldn't be any issues doing patch upgrades (e.g. 2.3 to 2.3.1), but we do know that upgrading from new versions (2.2 to 2.3) currently makes them incompatible with Pro, since the environment contains ArcPy binaries versioned for the specific version of Pro we ship with. From the above, it looks like you're trying to install into the default `arcgispro-py3` environment. We generally try to keep that environment free of changes, because it is modified by the installer at installation, and means there is always a fallback environment users can use independent of what we lay down. If you run `conda env list` do you see any additional environments? By default, user environments are written to %LOCALAPPDATA%\Esri\conda\envs.
If you only need a few packages, the simplest thing to do is to create a new environment, then populate it with anything you do need. There are complete instructions in this thread: https://community.esri.com/message/830134-re-upgraded-to-23-and-i-cannot-use-my-previously-cloned-co... but for a couple of packages, I'd just create a new one then ask for the packages you do need. For your case, you'll want the `opencv` package. I confirmed that it does install locally for me in a cloned environment, both from within Pro and the command line, with the package name of just "opencv" (It is currently pulling in version 3.4.2).
If that doesn't work for you, let us know and we can dig further.
Cheers,
Shaun
Hi Shaun thanks for your help. In the end I was successful, but had to do everything through command prompt. Even after I clone the default environment and rename it in command prompt, when I open Pro back up, the install packages button is no longer greyed out, but it doesn't actually do anything. I had to go back into command prompt to install OpenCV. So basically I can't do anything using the Python Package Manager, but using command prompt I can navigate around that. What Joe said is right too - patching through "kills" any custom environment made in the previous version so you're forced to re-do everything.
You should be able to clone your default to your user directory. (Personally I wish Pro allow us to put it where we want it: maybe something not so buried like C:\myENVS). I have a couple 'dead' environments myself, from previous version installs. Like Shaun Walbridge, I too was able to add opencv to my active cloned environment.
As of Pro 2.3, you can make environments in any location -- just click the Clone button adjacent to the environment you'd like to copy, then change the path to your desired location:
Using Python with ArcGIS - YouTube
It should then work -- Pro will see it, and you can use it as your default for Pro if you'd like. Conda should also see it (via its inclusion into the environments.txt file that conda shares across installs).