Installing python-igraph for python 3.6 on Windows

Viewed 4250

I want to install the python-igraph package, but I am currently using python 3.6.1 and I don't find any installer for this new version of python. Do you know how can I install python-igraph for this version?

I have tried to install python-igraph for older versions from anaconda cloud but a version problem occurs.

!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.`

I know that python-igraph exists for older python versions, but I don't want to overwrite the current python 3.6 version, so I think I need a new environment to install the older version and be able to use both.

I have already tried to create a new environment for python 3.5:

!conda create -n py35 python=3.5 ipykernel

But after 30min I didn't obtain any response...

I have also followed the same procedure to install a package for python 2.7 (from marufr contributor), but I get the same problem creating an environment for python 2.7.

Note: I am working from Jupyter notebook on Windows (win-64) and using Anaconda.

Update:

Solution found here: https://medium.com/towards-data-science/environment-management-with-conda-python-2-3-b9961a8a5097

Since there is no python-igraph for python 3.6 yet, I have to use an older version.

First, from Anaconda Prompt, install the nb_conda_kernels package before creating the new environment:

conda install nb_conda_kernels

Then, create the environment where I will work with the older python version:

conda create -n py35 python=3.5 ipykernel

Finally, install the package through the wheel (found here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph)

pip install python_igraph‑0.7.1.post6‑cp35‑none‑win_amd64.whl (You have to this command in the same folder that you donwloaded the wheel!)

2 Answers

There is a Windows installer for igraph‘s Python interface on the Python Package Index. Download the one that is suitable for your Python version (currently there are binary packages for Python 2.6, Python 2.7 and Python 3.2, though it might change in the future). To test the installed package, launch your favourite Python IDE and type the following:

import igraph.test
igraph.test.run_tests()

The above commands run the bundled test cases to ensure that everything is fine with your igraph installation.

Related