【问题标题】:Installing Pydot and Graphviz in Anaconda environment with Python 3 (MacOS)使用 Python 3 (MacOS) 在 Anaconda 环境中安装 Pydot 和 Graphviz
【发布时间】:2018-02-08 12:05:13
【问题描述】:

我想在我的 Python 3 Anaconda 发行版中安装 pydot 和 graphviz,但是 conda 抱怨 pydot 和 Python 3 之间存在冲突:

UnsatisfiableError: The following specifications were found to be in conflict:
  - pydot -> pyparsing 1.5.6 -> python 2.7*
  - python 3.5*
Use "conda info <package>" to see the dependencies for each package.

我在 MacOS El Capitan 上。

我找到了this answer,但没有多大帮助,因为当我尝试从他们的网站安装 Graphviz 时,他们没有任何 El Capitan 版本。所以我什至无法执行第 1 步。

任何帮助将不胜感激(更改分布不是一种选择..)!

【问题讨论】:

    标签: python anaconda graphviz pydot


    【解决方案1】:

    GraphViz 可以通过MacPorts 安装在 El Capitan 上,正如here 所讨论的那样。自行安装 MacPorts 后,运行:

    port install graphviz
    

    GraphViz 相关端口列在herepydot可以安装from PyPI

    pip install pydot
    

    您看到的pyparsing 的依赖是旧版本,这意味着您正在尝试安装旧版本的pydot。 PyPI 上提供了最新的pydot == 1.2.3

    【讨论】:

    • 不幸的是,MacPorts 与 Anaconda 发生冲突,两者一起使用时我遇到了非常烦人的问题!有没有没有 MacPorts 的解决方案?
    • GraphViz 的网站上有一个*.pkg,或者从source 构建GraphViz。关于 Python,我从未使用过 Anaconda,根据我的间接经验,它只会导致问题(平面比嵌套的 [PEP 20] 好)。我曾经使用 MacPorts,直到我意识到它也是嵌套的。始终有效的最简单的解决方案是从其 source 构建 CPython,这就是我所做的。在 MacOS 上,只需确保使用默认的系统编译器,并从源代码安装 OpenSSH。
    猜你喜欢
    • 2015-02-13
    • 2020-10-18
    • 2018-04-17
    • 2018-04-10
    • 1970-01-01
    • 2018-09-25
    • 2023-02-23
    • 2018-06-20
    相关资源
    最近更新 更多