【问题标题】:Installing graph-tool - ubunutu 14.04 - anaconda - jupyter notebook - python 2.7安装图形工具 - ubunutu 14.04 - anaconda - jupyter notebook - python 2.7
【发布时间】:2017-10-31 13:12:14
【问题描述】:

所以我整天都在尝试在我的 Ubuntu 系统上安装图形工具模块。我似乎无法弄清楚。基本上我想在 jupyter notebook 中使用这个包(在 anaconda 环境中)。我遵循了几个安装说明,但似乎没有任何效果。

例如:https://gist.github.com/dlozeve/ed59bba8bc8cb9b21e2af36cc9766938

我开始配置(根据我使用 python2.7 的事实进行调整),

./configure --prefix=/home/timo/anaconda2/envs/graph/ --with-python-module-path=/usr/local/lib/python2.7/site-packages

屈服:

configure: error: *** A compiler with support for C++14 language features is required.

有谁知道我可能做错了什么?或者作为让图形工具在我的 jupyter notebook 中工作的更简单方法?

非常感谢!

【问题讨论】:

    标签: python-2.7 ubuntu anaconda jupyter-notebook graph-tool


    【解决方案1】:

    configure 脚本准确地告诉您出了什么问题:您需要一个支持 C++14 的编译器。这只是意味着您的 GCC 太旧了。

    (您没有告诉我们任何相关细节,例如您拥有的编译器版本、库版本等,所以我们只能猜测。但幸运的是,configure 诊断非常清楚。)

    安装图形工具的更简单方法是升级发行版(14.04 已过时)并使用 Ubuntu 软件包,如下所述:https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#debian-ubuntu

    【讨论】:

    • 我确实安装了最新的 GCC。但是,我升级到 16.04 LTS 并设法按照说明中的说明安装了图形工具,但我仍然无法在 jupyter 笔记本中使用该软件包。我是否必须再次为 Anaconda 单独安装它?
    • 你没有抓住重点。 Ubuntu 14.04 中最新的 GCC 是 4.8,没有足够的 C++14 支持。正如我所说,这个版本是 Ubuntu 太旧了。
    • 您必须使用 Ubuntu 包管理器安装 jupyter。 Anaconda 的 Python 看不到系统安装的模块。
    • 我明白了。我确实通过pip install jupyter 安装了它。如果我然后启动jupyter notebook 并尝试导入from graph_tool.all import * 我仍然会得到ImportError: No module named graph_tool.all
    • Ubuntu中的系统包管理器是apt(如apt-get等),不是pip。
    【解决方案2】:

    由于 graph-tool 似乎无法在 anaconda 环境中运行,并且 Ubuntu 14.04 不支持所需的最新 C++ 编译器,我确实安装了 Ubuntu 16.04 并首先遵循 [https://www.google.de/amp/s/www.rosehosting.com/blog/how-to-install-jupyter-on-an-ubuntu-16-04-vps/amp/] 然后最后安装了 graph-tool如主页所述。

    这样我就可以使用 jupyter notebook 并且仍然能够导入图形工具。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-05
      • 2018-07-25
      • 2017-01-02
      • 1970-01-01
      • 2018-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多