Installing Opencv

How do I install opencv to usr/bin/python3.6 or home/nvidia/archiconda/myenv?

It always installs everything to /usr/bin/python2.7 no matter how many times, I might try to install it within python3 env.

What is your install method?

I tried both Building from source as well as by using “sudo apt-get install opencv-python”.

The apt package will not enable the GPU, so building from source is recommended. The build script by community member @mdegans builds and installs both - bindings for Python2 and Python3.

I tried it but what if I want to have it installed into

/home/nvidia/miniforge-pypy3/envs/envname/bin/ ?

The script just installs it within usr/bin/python3.5 but I would like to have it installed within my conda environment.


Would you mind to check if this suggestion works for you?


Hi linuxfs,

If you follow this guide:

If you have your conda enviroment activated when you are running the cmake command it will install to your enviroment.