0

I've installed igraph form .whl file using pip install. When I was trying to test the correctness of installation

import igraph.test
igraph.test.test()

I got this error:

Traceback (most recent call last):
  File "D:/Nauka/Praca-inzynierska/Barabasi-Albert.py", line 4, in <module>
    import igraph.test
  File "D:\Programy\Python 3.5\lib\site-packages\igraph\__init__.py", line 34, in <module>
    from igraph._igraph import *
ImportError: No module named 'igraph._igraph'

(the same error pops out if I'm trying to import igraph not igraph.test).

I've tried adding path (I don't know if this is rigth):

import sys
sys.path.append ("D:/Programy/Python 3.5/Lib/site-packages/igraph")

but it didn't work.

One thing I discovered is that if I delete "__init__" file from igraph folder I can import igraph without error, but it doesn't work for igraph.test.

If it's relevant I have Python 2.7 installed on my machine alongside Python 3.5.

Thank you in advance for any help.

  • Where did you get the `.whl` file from? Did you try the one from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph ? Did you install the one for the correct architecture of your machine (32-bit vs 64-bit)? – Tamás Oct 06 '16 at 12:03
  • Yes, I downloaded 64-bit version from that side (64-bit windows 7 on my machine). During installation I got an error, but I don't remember exact message. Solved the problem by changing name of the file from _python_igraph-0.7.1.post6-cp35-none-win_amd64.whl_ to _python_igraph-0.7.1.post6-cp35-none-win32.whl_ (solution from some website). – PawelDrozd Oct 07 '16 at 16:19

0 Answers0