6

I have tried to install Igraph for python but of no avail I followed the procedure given on http://igraph.org/python/doc/tutorial/install.html

I even tried Pycairo procedure given at the end of the site

But igraph is not working either on Enthought Canopy or Anaconda

Please help

1 Answers1

10

Try using a precompiled binary here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-igraph

Choose the proper version, use pip and type:

python -m pip install path/to/igraph.whl

Do not change the wheel name. Make sure you have pip, wheel and setuptools installed.

Alex Huszagh
  • 13,272
  • 3
  • 39
  • 67
  • there are so many versions to the file. what does 'cp' stands for in the file name ? Could u please help me with this – kshitij srivastava Dec 06 '15 at 02:57
  • cp is cpython, 27 means Python2.7, 33 is Python 3.3, etc. The other crucial parameter is ‑none‑win32.whl, or ‑none‑win_amd64.whl win32 is a 32-bit architecture, while amd64 is a 64-bit architecture. Choose the correct version for your Python install. – Alex Huszagh Dec 06 '15 at 03:02
  • I successfully installed igraph and pycairo for 64 bit. However, my program which I am running in enthought canopy still doesnt recognise igraph module – kshitij srivastava Dec 06 '15 at 03:30
  • Did you check the Python path? – Alex Huszagh Dec 06 '15 at 03:44
  • My python 2.7 is installed at location C:\Python27. I updated my pip. After that i copied pycairo.whl and igraph.whl file in C:\Python and by using command prompt i successfully installed both of these. After that I opened my canopy and changed the working directory to C:\ Python and wrote the first line in file as import igraph. But I get this error - "ImportError: No module named igraph" – kshitij srivastava Dec 06 '15 at 04:30
  • Python 2.7 and canopy are all 64 bit – kshitij srivastava Dec 06 '15 at 04:33
  • Can you try it from a standard install? Also, try in Canopy (gets the executable path in canopy): "import sys; sys.executable" – Alex Huszagh Dec 06 '15 at 05:16
  • It didnt work on canopy, however, igraph is now working in anaconda. and i m using spyder IDE on anaconda – kshitij srivastava Dec 06 '15 at 06:00
  • You probably need to install it on the Spyder IDE python executable. The sys.executable for C:\Python is likely different than that for Canopy. Do: "import sys; sys.executable". – Alex Huszagh Dec 06 '15 at 06:12
  • 1
    hey there ! it still not working. but my program is working fine on anaconda. thanks for ur help. I will try to fix canopy once i get time in future... Thanx a lot for ur help – kshitij srivastava Dec 07 '15 at 02:25