【问题标题】:Installing python-igraph for python 3.6 on Windows在 Windows 上为 python 3.6 安装 python-igraph
【发布时间】:2017-10-03 13:09:49
【问题描述】:

我想安装 python-igraph 包,但我目前使用的是 python 3.6.1,我没有找到这个新版本 python 的任何安装程序。你知道如何为这个版本安装 python-igraph 吗?

我尝试从 anaconda cloud 为旧版本安装 python-igraph,但出现版本问题。

!conda install -c vtraag python-igraph

Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:

- python 3.6*
- python-igraph -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.`

我知道python-igraph对于旧的python版本存在,但是我不想覆盖当前的python 3.6版本,所以我想我需要一个新的环境来安装旧版本并且能够同时使用两者。

我已经尝试为python 3.5创建一个新环境:

!conda create -n py35 python=3.5 ipykernel

但是30分钟后我没有得到任何回应......

我也按照相同的过程为 python 2.7 安装了一个包(来自 marufr 贡献者),但我在为 python 2.7 创建环境时遇到了同样的问题。

注意:我在 Windows (win-64) 上使用 Jupyter 笔记本并使用 Anaconda。

更新:

在这里找到的解决方案: https://medium.com/towards-data-science/environment-management-with-conda-python-2-3-b9961a8a5097

由于python 3.6还没有python-igraph,所以我必须使用旧版本。

首先,在 Anaconda Prompt 中,在创建新环境之前安装 nb_conda_kernels 包:

conda install nb_conda_kernels

然后,创建我将使用旧版 python 的环境:

conda create -n py35 python=3.5 ipykernel

最后,通过轮子安装包(在这里找到:http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph

pip install python_igraph‑0.7.1.post6‑cp35‑none‑win_amd64.whl(您必须在下载轮子的同一文件夹中执行此命令!)

【问题讨论】:

    标签: installation anaconda igraph python-3.6


    【解决方案1】:

    Python 包索引上有 igraph 的 Python 接口的 Windows 安装程序。下载适合您的 Python 版本的那个(目前有 Python 2.6、Python 2.7 和 Python 3.2 的二进制包,但将来可能会改变)。要测试已安装的包,请启动您最喜欢的 Python IDE 并输入以下内容:

    import igraph.test
    igraph.test.run_tests()
    

    上述命令运行捆绑的测试用例,以确保您的 igraph 安装一切正常。

    【讨论】:

    • 关键是我只有 Python 3.6,我无法创建新环境来安装旧的 Python 版本而不覆盖当前版本。
    【解决方案2】:

    现在,您可以下载'python_geohash‑0.8.5‑cp36‑cp36m‑win_amd64.whl'

    使用以下命令安装:

    pip install python_geohash‑0.8.5‑cp36‑cp36m‑win_amd64.whl
    

    那么你就可以在你的Python3.6中使用python-igraph了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-20
      • 2018-09-02
      • 1970-01-01
      相关资源
      最近更新 更多