When I import the igraph package in my project, I get an AttributeError. This only happens in the project directory:
[12:34][~]$ python2
Python 2.7.1 (r271:8
Most likely, there is a module io
in ~/projectdir
or one of the paths the project configures. The gzip module imported by igraph starts with
import io
and expect the built-in io module, not your project's one. Look for an io
directory, or io.py
or io.pyc
. It can also help to scrutinize sys.path
for any other directories (maybe outside of ~/projectdir
) that might contain modules named io
.