How to use my Opencv installation in environments

Hi community,
I have a pc with GPU and I make my own compilation of OpenCV (cv2) with my GPU.

I installed Anaconda and with the base environment everythig runs ok. The problem is when I tried to create a new environment, I cannot use my previously installed cv2, because it don’t apears in the package list (anaconda navigator) it only appears in the site-packages directory, but, even copying it to the new env I cannot use cv2.

Does anyone know how to solve this?

Thank you in advance for your help.

Javier

1 Like

Good morning,

Thank you for reaching out, the environments are isolated from each other, if you installed a package in one environment you will have to install it again in the new one, in this case:

conda install -n ENVNAME opencv

Tell us if you need anything else.

Thanx Carlos,

I knew that, the problem is that I’m using my own compilation of OpenCV to take profit of my RTX3060 GPU.

I undestand with Anaconda I must do a new compilation for every environment.

I did another solution that was make an independet Python + OpenCV with GPU installation and then install Anaconda as an IDE. I put my own cv2 installation into the PATH vble. and it works well.

Kindest regards.

Javier