在Anaconda环境中安装pydot和graphviz软件包 [英] Installing pydot and graphviz packages in Anaconda environment

查看:401
本文介绍了在Anaconda环境中安装pydot和graphviz软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在Python中创建图形决策树,并且当前正在尝试同时安装pydotgraphviz.

I want to be able to create graphical decision trees in Python, and I am currently trying to install both pydot and graphviz.

我正在将Anaconda作为我的环境(以及Spyder),并尝试运行以下代码行

I am using Anaconda as my environment (along with Spyder), and have tried to run the following lines of code

conda install -c https://conda.binstar.org/t/TOKEN/j14r pydot

结果

Error: unknown host: http://repo.continuum.io/pkgs/pro/win-32/
Error: unknown host: http://repo.continuum.io/pkgs/free/win-32/
Error: unknown host: https://conda.binstar.org/t/TOKEN/j14r/win-32/
Error: No packages found matching: pydot

我也尝试过使用pip install pydotpip install graphviz来获得类似的结果:

I have also tried using pip install pydot and pip install graphviz with similar results:

Downloading/unpacking pydot
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pydot
Cleaning up...
No distributions at all found for pydot
Storing complete log in [...]

试图弄清楚如何解决这个问题我感到很无聊,所以我希望在那里的任何人都可以给我一些提示.

I am getting pretty bored at trying to figure out how to go about this, so I was hoping anyone out there could give me some tips perhaps.

谢谢

推荐答案

我遇到了同样的问题,并通过以下方式解决了此问题(顺序是重要):

I had the same issue and solved it by (order is important):

  1. 只需通过sudo apt-get install graphviz
  2. 安装graphviz
  3. 通过conda sudo ~/anaconda2/bin/conda install graphviz
  4. 为Python安装graphviz
  5. 最后,通过使用conda sudo ~/anaconda2/bin/conda install pydot
  6. 安装pydot

这个答案已经过期,但是这篇帖子对我有所帮助(与

This answer is overdue but this post helped me (together with this one that mentions the installation order), so hopefully this answer will help someone else. I'm using Ubuntu 14.04 and Python 2.7.

P.S.显然,上述算法的步骤1

P.S. apparently, there could be some issues with step 1 of the above algorithm, this post mentions how to fix them.

这篇关于在Anaconda环境中安装pydot和graphviz软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆