【问题标题】:No module named igraph - Error没有名为 igraph 的模块 - 错误
【发布时间】:2016-11-03 07:13:31
【问题描述】:

我在 mac-osx 上使用 anaconda 并安装了 python-igraph。目前无法导入 igraph。

以下是显示的错误:

Python 2.7.12 |Anaconda 4.1.1 (x86_64)|

导入 igraph ---- ImportError: 没有名为 igraph 的模块

它存在于这条路径中 - /Users/pc_name/anaconda/lib/python2.7/site-packages,我只找到 python_igraph-0.7.1.post6-py2。 7.egg-info文件。

我尝试了许多可能的方法,这些方法可以在堆栈溢出时的其他问题中找到。我该如何解决这个问题?

【问题讨论】:

    标签: python macos anaconda igraph importerror


    【解决方案1】:

    你还没有提到你是如何安装 python-igraph 的,所以很难说什么。但我很确定this package 工作得很好。

    【讨论】:

      【解决方案2】:

      我使用了以下命令,它在 Python 3.7 中对我有用

      pip install python-igraph
      

      可以找到有关软件包及其安装的详细信息 https://igraph.org/python/

      【讨论】:

        【解决方案3】:

        1)在我电脑上的 python-igraph-master 目录中运行以下命令:

        conda install -c marufr python-igraph 
        

        2)在新的终端窗口中启动python:

        $python
        Python 2.7.13 |Anaconda 4.3.1 (x86_64)| (default, Dec 20 2016, 23:05:08) 
        [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
        Type "help", "copyright", "credits" or "license" for more information.
        Anaconda is brought to you by Continuum Analytics.
        Please check out: http://continuum.io/thanks and https://anaconda.org
        >>> import igraph
        >>>
        

        希望对你有帮助

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2020-02-12
          • 2017-12-26
          • 2019-01-17
          • 2014-12-25
          • 2018-04-29
          • 2011-06-26
          • 2017-01-07
          • 2013-06-28
          相关资源
          最近更新 更多