Installing a package inside Conda using apt install

Viewed 5005

I'm trying to install opencv in my Jetson TX2. I would like to install it within my conda environment. I used the following command to do so,

sudo apt-get install python-opencv

It actually installs opencv but outside the conda so I'm not able to import it within conda. How can I have it installed within my conda?.

3 Answers

apt installs packages system-wide

conda installs packages on currently active conda environment

Make sure you are in a conda environment.

Run a conda command, instead of an apt-get command.

conda install -c conda-forge opencv

You can just install pip in the conda environment and install opencv using pip.

conda install pip
pip install opencv-python
Related