3

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?.

Mr. Randy Tom
  • 151
  • 2
  • 9
  • I run into the same problem trying to install `fitz` (https://stackoverflow.com/questions/50801270/extract-comments-from-pdf). Did you find the answer? – Homero Esmeraldo May 19 '22 at 23:31

3 Answers3

2

Make sure you are in a conda environment.

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

conda install -c conda-forge opencv
Uuuuuumm
  • 504
  • 4
  • 18
1

apt installs packages system-wide

conda installs packages on currently active conda environment

Jumabek Alikhanov
  • 2,165
  • 3
  • 20
  • 21
  • Not everything available in `apt-get install` is available in `conda install`. This is not a good answer. – Homero Esmeraldo May 19 '22 at 23:58
  • Yes, I agree, not everything available in apt is available in conda for installation. Thanks for that knowledge. However, I don't see how this knowledge relates to my answer. would you elaborate a bit more? – Jumabek Alikhanov May 20 '22 at 01:30
  • The title of the question is "Installing a package inside Conda using apt install". Your answer doesn't answer that. It just finds another way to install the package the OP wants. I came to the question searching for a way to install a package that is not available in `conda install`. I'm probably not alone. – Homero Esmeraldo May 20 '22 at 02:46
-1

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

conda install pip
pip install opencv-python
Md Shafiul Islam
  • 1,375
  • 1
  • 11
  • 18