简体   繁体   English

使用 apt install 在 Conda 中安装 package

[英]Installing a package inside Conda using apt install

I'm trying to install opencv in my Jetson TX2.我正在尝试在我的 Jetson TX2 中安装 opencv。 I would like to install it within my conda environment.我想将它安装在我的 conda 环境中。 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.它实际上安装了 opencv 但在 conda 之外,所以我无法在 conda 中导入它。 How can I have it installed within my conda?.如何将它安装在我的 conda 中?

apt install s packages system-wide apt install s 包系统范围

conda install s packages on currently active conda environment conda install

Make sure you are in a conda environment.确保您处于 conda 环境中。

Run a conda command, instead of an apt-get command.运行 conda 命令,而不是 apt-get 命令。

conda install -c conda-forge opencv

You can just install pip in the conda environment and install opencv using pip.您可以在 conda 环境中安装 pip 并使用 pip 安装 opencv。

conda install pip
pip install opencv-python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM