首页 > 解决方案 > 如何在虚拟环境中使用 conda?

问题描述

我在窗户上。我做了一个 venv 使用virtualenv

python -m venv venv2

并使用pip install NAME.

现在我正在尝试安装OSMnx包,但这需要 conda。我已经为整个系统安装了 anaconda 并将其添加到 PATH 中。

但是我不确定如何在虚拟环境中使用它。

运行命令如

conda config --prepend channels conda-forge

产生错误

conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 

正确并重试。

那么如何在虚拟环境中安装这个 conda 包呢?

标签: pythonanaconda

解决方案


我不知道为什么,但问题本身就解决了。使用conda命令按预期在 virtualenv 中工作。


推荐阅读