pythongraphigraphjulia

Using Igraph library in Julia with PyCall


I would like to use certain features of the Python library Igraph in Julia-lang. I am aware that there exists a Julia package Graphs but I specifically need Igraph. I have previously used python libraries with PyCall, but this time when I do.

using PyCall
@pyimport igraph

But I get error:

@pyimport not defined

My current Julia version is: 0.4.0-dev+147


Solution

  • From the main page of the igraph website:

    igraph can be programmed in R, Python, and C/C++.

    So right now there's no official native Julia package for igraph. In general, Julia can't read a package native to another language, so you'll either have to write your own interface for it or find a comparable existing Julia package.

    You can browse available Julia packages on http://pkg.julialang.org.


    Since you edited your question to be specific to PyCall, I'll address that as well.

    Note that you're using a development version of Julia. Try using the latest stable release (0.3.7, I believe) and running your code using PyCall again.