简体   繁体   English

pip是否将软件包安装到我的conda环境中?

[英]Does pip install packages into my conda environment?

If I have created an environment with the 'conda create' command, then I activated it: 如果我已经使用“ conda create”命令创建了一个环境,那么我将其激活:

conda activate myEnv

Now if I want to install a package with 'conda install' to 'myEnv', but this package isn't in the conda repository. 现在,如果我想将“ conda install”安装为“ myEnv”,则该软件包不在conda存储库中。 So I have to install it with the 'pip' command: 所以我必须使用'pip'命令安装它:

pip install newPackage

In this case, is the newPackage installed into 'myEnv', or it will be installed outside of the conda environment. 在这种情况下,是将newPackage安装到“ myEnv”中,还是将其安装在conda环境之外。

Yes, it should be installed in myEnv. 是的,应该将其安装在myEnv中。

You can use which pip in Linux to check whether your environment's pip is called or the one from outside. 您可以使用Linux中的which pip来检查您环境的pip是被调用还是来自外部。

For the pip in your environment, it will be a path similar to <path to anaconda environment>/bin/pip . 对于您环境中的pip,它的路径类似于<path to anaconda environment>/bin/pip

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

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