I have installed python-igraph 0.9.6.
The following runs on Idle:
import igraph as ig
print(ig.version)
0.1.14
This does not:
g = ig.Graph()
Traceback (most recent call last):
File “<pyshell#2>”, line 1, in
g = ig.Graph()
AttributeError: module ‘igraph’ has no attribute ‘Graph’
These are the first two commands from the igraph tutorial. Any ideas what the problem could be? Is the Python wrapper to igraph broken?
You used pip install igraph
. This is incorrect. Uninstall this package and use pip install python-igraph
instead.
Great, thanks, that worked. I also required VC, mentioned in a previous post.
To avoid misunderstanding by future readers: it is not necessary to install any developer tools such as the Visual C++ compilers or Visual Studio.
What is necessary to have is the Visual C++ runtime library, referred to by Microsoft as “Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019”. The majority of users will already have this. Some with old versions of Windows may not.
What is your Windows version?