使用Python 3(MacOS)在Anaconda环境中安装Pydot和Graphviz

时间:2017-08-30 17:05:40

标签: python anaconda graphviz pydot

我想在我的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步。< / p>

任何帮助都将受到赞赏(更改分发不是一个选项......)!

1 个答案:

答案 0 :(得分:0)

GraphViz可以通过MacPorts安装在El Capitan上,如here所述。安装MacPorts后:

port install graphviz

列出了与GraphViz相关的端口here。对于Python 2或Python 3,pydot可以安装from PyPI

pip install pydot

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