无法使用 conda-forge 安装 ggplot

Posted

技术标签:

【中文标题】无法使用 conda-forge 安装 ggplot【英文标题】:Cannot install ggplot with conda-forge 【发布时间】:2020-06-01 04:54:46 【问题描述】:

我正在尝试使用 conda-forge 安装 ggplot。但它显示了一些特定的错误。详细错误信息如下。

(base) C:\Users\ASUS>conda install -c conda-forge ggplot=0.11.5
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - ggplot=0.11.5 -> python[version='2.7.*|3.5.*|3.6.*|3.4.*']

Your python: python=3.7

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==11.0=0
  - feature:|@/win-64::__cuda==11.0=0

Your installed CUDA driver is: 11.0

请帮助我解决任何问题。

【问题讨论】:

您不应该使用基础环境进行开发。为每个项目/应用程序创建一个新的独立环境。 【参考方案1】:

我找到了ggplot 的替代方案,它包含所有ggplot 函数。这是plotnine。 安装plotnine

# Using pip
$ pip install plotnine         # 1. should be sufficient for most
$ pip install 'plotnine[all]'  # 2. includes extra/optional packages

# Or using conda
$ conda install -c conda-forge plotnine

使用指南请访问https://plotnine.readthedocs.io/en/stable/index.html

【讨论】:

【参考方案2】:

yhat的ggplot python端口stopped in 2016的开发。它似乎只与早于 python 3.7 的pandas<0.22 兼容,因此不适用于 conda-forge 上的 python-3.7。

最简单的使用方法是安装到带有python3.6解释器的环境中。

【讨论】:

以上是关于无法使用 conda-forge 安装 ggplot的主要内容,如果未能解决你的问题,请参考以下文章

conda install -c conda-forge opencv 后 Spyder 无法启动

无法使用 conda-forge 部署 docker 解决方案

使用诗歌从 conda-forge(例如 cartopy)安装预构建包,而不依赖 conda(仅使用通道)

Conda-Forge 与 conda-forge 存储库和安全性

conda-forge / cran 包装的 X 射线扫描

conda-forge 和 cf-staging 通道有啥区别