6

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
  • 311
  • 5
  • 13
  • 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

4

apt install for system-wide package install

conda install for installing package in conda environment

Jumabek Alikhanov
  • 2,305
  • 3
  • 21
  • 21
  • 1
    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
  • 3
    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
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
  • 608
  • 5
  • 21
0

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,579
  • 1
  • 13
  • 19