本文介绍了如何在没有 pip 的情况下将包添加到 conda 环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将包添加到现有的 conda 环境中?

How can I add a package to an existing conda environment?

如果是python包我可以使用pip install <package>,但是如果pip不起作用怎么办?

If it is a python package I can use pip install <package>, but what if pip does not work?

激活环境并使用conda install <package>就够了吗?

Is it sufficient to activate the environment and use conda install <package>?

推荐答案

您已经回答了自己的问题.事实上,如果可以的话,你真的很想做 conda install ... 而不是使用 pip.

You've answered your own question. In fact you really want to do conda install ... instead of using pip if you can.

您也可以在不激活环境的情况下安装 conda 包.只需使用 conda install -n <env_name><package>conda install -p <path/to/env><包>.

You can install a conda package also without activating the environment. Just use conda install -n <env_name> <package> or conda install -p <path/to/env> <package>.

这篇关于如何在没有 pip 的情况下将包添加到 conda 环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-04 03:20