我假设 pip 和 conda 尽管存在差异,但都是包管理器,并检查安装在环境中的包的一致性!不过,就我而言,我在 python=3.6 之上有一个 requirements.txt 列表。在我的 conda 虚拟环境中,我一一安装了它们。奇怪的是,当在 anaconda.org 频道中找到一些包并使用 conda install 安装它们时,conda 会抱怨!一个例子是当我尝试安装 statistics=1.0.3.5 时,我在终端上收到了这条消息:
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- statistics=1.0.3.5 -> python[version='2.7.*|<3|>=2.7,<2.8.0a0']
Your python: python=3.6
然而,当我用 pip 做的时候,它奏效了!
这是为什么?
我会在使用这个包裹的路上遇到问题吗?
我阅读了这篇 Stackoverflow post 关于 pip 和 conda 之间的区别的文章,并试图从 doc 中理解它(虽然不是那么成功)。